Longest Palindromic Substring

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

A palindrome reads the same forward and backward. If there are multiple longest palindromic substrings, return any one of them.

*...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: