Two test case are failing in K ORDERED LCS

https://ide.codingblocks.com/s/159863 this is the link

I think you should print dp[n][m][l] instead of dp[m][n][l].

sir 4th test case is still wrong

You are probably doing something wrong in order of your loops.

sir i have tried all possible combination of loops but it is still wrong

Hey @hsingla009
Please try your code again dp[n][m][l] instead of dp[m][n][l] this change. It’ll pass all test cases.

I have already suggested the same thing.

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.