the code isn’t not passing two testcases but getting the correct output https://ide.codingblocks.com/s/638082
LCS problem dynamic programming
Hi Kunal,
here was the error… ur outer loop was running till i < n1 and inner loop till j < n2 while it should be i <= n1 and j <= n2
I have corrected ur code and its passing all test cases now…
corrected code --> https://ide.codingblocks.com/s/638088
I hope it clears all ur doubts…
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.