Question d’entretien chez Amazon

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