Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.
This problem is an implementation of Manacher's Algorithm.
Reference:
Chinese: http://www.felix021.com/blog/read.php?2040
English: http://leetcode.com/2011/11/longest-palindromic-substring-part-ii.html