Return the length of the longest subsequence of s that is a palindrome. A subsequence keeps relative order but need not be contiguous.
Input: one line, the string s.
Output: the length of the longest palindromic subsequence.
bbbab
4
"bbbb".
cbbd
2
"bb".
agbdba
5
"abdba".
Run your code against the sample tests, or Submit to run the full suite.