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"
问题很清晰易理解,就是找到从左读和从右读是相同的子串(简称 回文串)。
最近公司项目赶在发布前期,好久都没刷LeetCode了,偷点懒,直接上截图: