problem0516

package
v0.0.0-...-d3fc627 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 0 Imported by: 0

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".

解题思路

见程序注释

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL