Longest Palindromic Substring

Try to solve the Longest Palindromic Substring problem.

Statement

Given a string s, return the longest palindromic substring in s.

Constraints

  • 11 \leq s.length 1000\leq 1000

  • s consist of only digits and English letters.

Examples

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