update solution for leetcode Longest Palindromic Substring