71. Longest Palindromic Substring
MediumString algorithms
Return the longest substring of s that is a palindrome. If several have the maximum length, return the one that starts first.
Example 1
Input: s = "babad" Output: "bab"
Example 2
Input: s = "cbbd" Output: "bb"
Constraints
1 ≤ s.length ≤ 1000