I am getting runtime error. Can anyone help me with this. I used Dp to solve this
Count Number of Binary Strings
You have indentation error, try to rectify it.
rectified but that is not theissue as test case 3 has passes
Can you please help me figuring why am I getting runtime error in test case 1 & 2
@gargayush34 your logic is correct, if you could provide me the updated code I can check what is the error.
@gargayush34 Your logic is correct but the test cases are not formatted properly, that is causing the error (It will work with C++) .
Just one thing , create a 2D array for DP of length 91 and calculate result for all positions instead of calculating it again and again.
If this solves your doubt please mark it as solved.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.