package
0.0.0-20190519142212-fe39b3200b40
Repository: https://github.com/imgoogege/leetcode-in-go.git
Documentation: pkg.go.dev
# README
516. Longest Palindromic Subsequence
题目
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000.
Example 1:
Input:
"bbbab"
Output:
4
One possible longest palindromic subsequence is "bbbb".
Example 2:
Input:
"cbbd"
Output:
2
One possible longest palindromic subsequence is "bb".
解题思路
见程序注释