ServiceNow interview question

Write a program to find the longest palindrome in a given string