由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 请教palindrome算法
相关主题
[转载] CS Interview questionC++ 程序求助
一道C++面试题git
how to check if two palindromes are unique?Is it safe to use unique_ptr with STL container?
有人做过ITA的考试题吗?Java job scheduler
求String中递增子字符串的个数怎么解?要求O(nlogn)Amazon Summer Intern Offer, 发面经
About Longest repeated substringBloomberg面试题
help on longest common substring有人同看Longest Palindromic Substring 这道题么?
longest common sequence可以正着求么?DP通项公式
相关话题的讨论汇总
话题: longest话题: 算法话题: palindrome
进入Programming版参与讨论
1 (共1页)
t******e
发帖数: 98
1
问题如下:
Given a string 's = s1s2...sn', then the longest common subsequence of 's'
and its reverse 'R(s)' is also the longest palindromic subsequence in 's'.
e.g. the longest palindromic subsequence of string 's=abcadd' is 'aba'.
我觉得这个算法用来寻找longest palindromic subsequence (not substring)是很方
便的(Complexity O(n^2)),但是没有想出如何证明算法的正确性,想请教高手帮忙,谢
谢了.
r********g
发帖数: 1351
2
DP
1 (共1页)
进入Programming版参与讨论
相关主题
DP通项公式求String中递增子字符串的个数怎么解?要求O(nlogn)
Linkedin八月onsite面经About Longest repeated substring
这个题目怎么做?多谢。可以用DP做吗?help on longest common substring
做题了,看看有没有比我更好的解法 (20个包子)longest common sequence可以正着求么?
[转载] CS Interview questionC++ 程序求助
一道C++面试题git
how to check if two palindromes are unique?Is it safe to use unique_ptr with STL container?
有人做过ITA的考试题吗?Java job scheduler
相关话题的讨论汇总
话题: longest话题: 算法话题: palindrome