O(n) algorithm to find longest palindromic substring w/o suffix trees
wcipeg.com
wcipeg.com
Although, it and variants have gotten some web press. A 2007 blog post was much passed around (http://johanjeuring.blogspot.com/2007/08/finding-palindromes...), which turned into some software (http://www.staff.science.uu.nl/~jeuri101/homepage/palindrome...). There's also a good exposition, and Python code, in another 2007 blog post (http://www.akalin.cx/longest-palindrome-linear-time).
I used the latter code to scan a local mirror of Project Gutenberg for word-unit palindromes, which are palindromes where words rather than letters are the units (http://www.kmjn.org/notes/word_unit_palindromes.html), which I why I know about it. It actually works for that with minimal modification, since it can operate on any Python sequence, not just strings.
I agree with the fact that getting the optimization isn't intuitive, but the basic O(n^2) on which the idea is based is almost trivial.
http://johanjeuring.blogspot.com/2007/08/finding-palindromes...
So I suppose substring in this context is defined to be a subsequence of the string (not necessarily consecutive characters)? Site is down...
Generally speaking anything you can do with a suffix tree you can do with suffix arrays... though oftentimes it is more complicated