LongestPalindrome Finder Optimized