Longest Common Subsequence

I am trying to solve this through recursion
But iam not able get output.
bcoz In max return is showing error.

Hey @souravrao3110
There are 2 corrections 1 logical and 1 syntatical
if(s1.at(i) == s2.at(j)){
return 1+Recursive(s1,s2,i+1,j+1); //if same char then we return 1+…
}
else{
return max(Recursive(s1,s2,i,j+1),Recursive(s1,s2,i+1,j) ); //Right syntax
}

Thank you,
kartik sir.

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.