Update longestPalindromicSubstring