Statement

Given a string s, find the length of its longest palindromic substring. The longest palindromic substring is a substring with maximum length that is also a palindrome. A phrase, word, or sequence is a palindrome that reads the same forward and backward.

For example, consider the string "bobgonoon". The palindromic substrings of "bobgonoon" are listed below:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.