longestPalindrome O(n^2)