update solution for Longest Palindromic Substring