dont know where my code is wrong
Test case 2 wrong answer
@ashudeo4 The way you are printing is wrong, you just have to reverse the process you used for creating the LCS array.
So starting from m and n
So first check
if check if s[m-1]==d[n-1]
then just store the element and decrease m,n both.
else if not equal
then move towards one from dp[m-1][n] or dp[m][n-1] because the larger one is the path for the
longest common subsequnce
Also take the size of array as 1001 not 1000 because you are comparing can be of 1000 length.