Help me with a question

Question-stackoverflow link

What kind of help do you want?

why are they so closely linked!!
How can we prove they both give the same answer

if we find out LCS of string and its reverse, we know how many maximum characters can form a palindrome. We need insert remaining characters.

You should read about LCS first.

1 Like

Alternatively I can use
recurse(i,j)=recurse(i+1,j-1) {If string[i]==string[j]}
else
recurse(i,j)=min(recurse(i+1,j)+1,recurse(i,j-1)+1);


Now I want you to prove their equivalences!

if i know about LCS then how can u relate this question with them?? plz tell me…

//