longestPalindrome and ZigZagConversion