update longest palindromic substring part ii