Frage im Vorstellungsgespräch bei Amazon

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