TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

O(n) algorithm to find longest palindromic substring w/o suffix trees

58 点作者 dhruvbird大约 13 年前

6 条评论

karamazov大约 13 年前
Does anyone know why the suffix tree algorithm is the one commonly shown as the solution to finding the longest palindrome? Manacher's algorithm is conceptually simpler, has better performance and memory demands, and isn't new (the original paper is from 1975).
评论 #3815381 未加载
评论 #3815881 未加载
Sembiance大约 13 年前
Does finding substring palindromes have any practical purpose at all? Just curious.
评论 #3816431 未加载
rheide大约 13 年前
Such a long explanation for what could be explained in a couple lines of code.
jgrant27大约 13 年前
Clojure vs. Common Lisp <a href="http://news.ycombinator.com/item?id=1016566" rel="nofollow">http://news.ycombinator.com/item?id=1016566</a>
VDegesys大约 13 年前
I'm honestly just curious and I could be missing something trivial... but how does the "simple asymptotically optimal solution" take into account an even length palindrome? in the sense of "deed" where there are never matching letters to the left and right of the interesting position...i think it would still be O(n) but I just don't see the algorithm taking it into account...
评论 #3815891 未加载
EricDeb大约 13 年前
site is down? I hope this isn't just an O(N) algorithm using Suffix Arrays
评论 #3815365 未加载
评论 #3815589 未加载