Print LCS Problem


plz check my code, im not getting it

@Bhavya_Goel
1)increase size of you dp to 1001*1001
2) line 44 should be if(s1[i-1] == s2[j-1])

https://ide.codingblocks.com/s/227581 one test case is not passing

@Bhavya_Goel
Delete line 54 to 57 and write
if(dp[i][j-1] >= dp[i-1][j]){ j–; }
else{ i–; }