Skip to content

Latest commit

 

History

History
79 lines (40 loc) · 778 Bytes

File metadata and controls

79 lines (40 loc) · 778 Bytes

中文文档

Description

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

Solutions

Python3

Java

...