Write a function that takes in a string and returns the length of the longest palindromic subsequence
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a function that takes in a string and returns the length of the longest palindromic subsequence of the string. A palindromic subsequence is a sequence of characters in the string that is the same when read forwards or backwards, but does not necessarily have to be a contiguous substring. For example, if the input string is "character", the function should return 5, since the longest palindromic subsequence is "carac".
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Posted Date: