Longest common subsequence

Hello @souravrao3110, use this as rows and columns
int rows = s1.size()+1; //rows
int cols = s2.size()+1; //columms
You did something else and I think you got confused as the rows and the columns are just the length of the string s1 and string s2.

yes i got confused
I first execute it with simple 2d array.
then i did not change the array size .
Thank you for helping me out.

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.