50. Longest Mirror Substring
mediumstringdynamic programming
Return the longest palindromic substring of s. If several have the same maximum length, return the one that starts earliest.
Example 1
Inputs = "babad"
Output"bab"
Example 2
Inputs = "cbbd"
Output"bb"
Example 3
Inputs = "a"
Output"a"
Constraints
- 1 ≤ s.length ≤ 1000