Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
meh solution in Clear category for The Longest Palindromic by Leonix
def longest_palindromic(a):
for length in range(len(a), 0, -1):
for i in range(len(a)+1-length):
candidate = a[i:i+length]
if candidate == candidate[::-1]:
return candidate
July 8, 2019
Comments: