Two test cases not passing
Count number of binary strings
u need to reinitialise ur dp table to 0 again after each test case. otherwise it will interfere with the values of the previous test case.
i tried that using memset but still got the same result
I will advise u to please think again on the recurrence relation because this is not the way I have seen anywhere.
Hint : think of Fibonacci
but fibonacci will come in bottom up right , the top down approach shown in video is what i have used
No u can use Fibonacci can be calculated using top down also.
but i used the other approach shown in video , please tell me the error in this approach
i am sorry i cant see the video.
video link of the method
I don’t have access sorry .