Print lcs dp que

why one test case is giving wrong ans
code: https://ide.codingblocks.com/s/142213

Hello @Chitra_Singla,

There is a small issue due to the order in which you are traversing the matrix.
First, you should check for the of moving up and then of moving left.

I have modified your code:

Hope, this would help.
Give a like if you are satisfied.

1 Like

@S18ML0016
can you please tell me the mistake here

[https://ide.codingblocks.com/s/269494](https://ide.codingblocks.com/s/269494)