all test cases passed except testcase 0.
Test case 0 not passing
@myself.yash.srivastav
hello yash,
u r first finding lcs string for first two strings and then lcs of obtained string with third string .
so ur approach will fail when more than once lcs string is possible.
for example
abc
acb
c
here from first two string two lcs are possible i.e ac and ab now if u will take ac and find its lcs with c then answer will be 1.otherwise if u will take ab and find its lcs with c then 0 will come .
so dont do it separately. use 3d dp
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.