Give an algorithm for finding out the longest palindrome in a given string
LCS(t,rev(t)) is not right,see:
t: abcxyycba
rev(t): abcyyxcba
the lcs is abc, but the palindrome is yy.
Finding the longest palindromic substring in linear time
http://www.akalin.cx/2007/11/28/finding-the-longest-palindromic-substring-in-linear-time/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment