In this question “It is guaranteed that there is only one unique longest common subsequence” but your test cases don’t ensure that.
It leads to unnecessary waste of time and mind. Please take care for other questions.
In this question “It is guaranteed that there is only one unique longest common subsequence” but your test cases don’t ensure that.
It leads to unnecessary waste of time and mind. Please take care for other questions.
Hey Kritika, Can you please mention the problem’s exact name, So that we can check the exact problem.
The question is ‘PRINT LCS’ from dynamic programming challenges. The question mentions that it is guaranteed there is only one unique longest common subsequence, but if you look at your second test case which is ‘’ abbae gbdea’’, the answer to this can be both ‘be’ and ‘ba’. My code was answering ba assuming there would not be any such testcase. But it is reported as wrong answer because you are accepting ‘be’ as the only answer.
I spent a day thinking what possibly could have gone wrong in my code thinking all possible test cases before unlocking the test cases.
I hope I have my doubt clear now.