Complete-Preparation

🎉 One-stop destination for all your technical interview Preparation 🎉

View the Project on GitHub

Longest palindromic subsequence 🌟🌟🌟

Solution

Code

int longestPalindromeSubsequence(string s)
{
    string t = s;
    reverse(t.begin(),t.end());
    return getLengthOfLCS(s,t);
}