摘要: Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest palindromic substring.自己只想到了O(n2)的算法,遍历每个字符,然后从中间向两旁扩,寻找最长子串。显示的结果一直是pending...http://www.felix021.com/blog/read.php?2040有O(n)的算法publicclassSolution {pu 阅读全文
posted @ 2013-09-26 22:24 果汁果粒 阅读(184) 评论(0) 推荐(0) 编辑