Longest Palindromic Substring — Solution & Editorial
Expand around each of the 2N−1 centers (odd and even) and record the widest palindrome reached.
Complexity: O(|S|2)
Expand around each of the 2N−1 centers (odd and even) and record the widest palindrome reached.
Complexity: O(|S|2)