Solve Longest Palindromic Substring