Longest Palindromic Substring
Given a string s
, return the length of the longest palindromic substring.
Constraints
n ≤ 1,000
wheren
is the length ofs
https://binarysearch.com/problems/Longest-Palindromic-Substring
Examples
Example 1
Input
- s =
mactacocatbook
Output
- answer =
7
Explanation
“tacocat” in the middle is the longest palindromic substring.
Leave a comment