Solved the longest palindromic substring problem.