Return the length of the longest palindromic subsequence of s (a subsequence that reads the same forwards and backwards; characters may be skipped).
For "bbbab" the answer is 4 ("bbbb").
The starter code is a plain recursion. It is correct but too slow for long strings.
Example 1
Input:
longest_palindrome_subseq('bbbab')
Output:
4
Example 2
Input:
longest_palindrome_subseq('cbbd')
Output:
2
0 <= len(s) <= 1000No results yet
Run your code to check it against the examples, or submit to run every test.