Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

<< [46] Find the longest contiguous palindrome >>

Given a string, find the longest palindromic contiguous substring. If there are more than one with the maximum length, return any one.

Examples:

>>> coding_problem_46("aabcdcb")
'bcdcb'

>>> coding_problem_46("bananas")
'anana'