Given a string `s`, find the longest subsequence of `s` that is a palindrome. Return its length. A **subsequence** does not need to be contiguous. **Example 1:** Input: `s = "bbbab"` Output: `4` Explanation: One possible LPS is `"bbbb"`. **Example 2:** Input: `s = "cbbd"` Output: `2` Explanation: One possible LPS is `"bb"`.
Interval DP
dp[i][j] = length of longest palindromic subsequence in s[i..j]. Fill by increasing substring length. If s[i] == s[j], take dp[i+1][j-1] + 2; otherwise max(dp[i+1][j], dp[i][j-1]).