Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 329 Bytes

005-longest-palindromic-substring.md

File metadata and controls

18 lines (13 loc) · 329 Bytes

Given a string s, find the longest palindromic substring(回文子串) in s. You may assume that the maximum length of s is 1000.

Example 1:

Input: "babad"
Output: "bab"
Note: "aba" is also a valid answer.

Example 2:

Input: "cbbd"
Output: "bb"

https://leetcode.com/problems/longest-palindromic-substring/