Problem in Print LCS Code2

i don’t know where there code is wrong. For some cases it is giving correct answers but failing for others. Help me .

In the question there is one more parameter K which you have not used . You have solved the problem like normal LCS.

1 Like