Solved Longest Palindromic Substring problem