Manacher's algorithm - longest palindrome substring.