Longest Palindromic Substring
Given a string, return the longest palindromic substring within it.
Statement
Given a string of characters, find and return the longest
Examples
Example 1
Sample input
"bccd"
Expected output
"cc"
Example 2
Sample input
xaabacxcabaaxcabaax
Expected output
xaabacxcabaax
Try it yourself
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.