Amazon interview question

Debug code snippets. Write an algorithm that provides the longest palindrome in a given string.