Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 318 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 318 Bytes

<< [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'