write longestPalindromeSubstring with Dynamic Programming