码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
leetcode - Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ["aa","...
分类:其他好文   时间:2014-09-27 20:16:10    阅读次数:211
URAL - 1297 Palindrome(后缀数组求最长回文子串)
Description The “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Unlimited» has infiltrated into “U.S. Robotics”. «U.S. R...
分类:其他好文   时间:2014-09-26 22:34:29    阅读次数:370
URAL 1297 Palindrome 后缀数组+RMQ
本题是利用后缀数组求最长的回文串。方法是将字符串反转之后拼接到原来的字符串末尾,中间用一个没有出现过的分割符隔开,原因是防止最长公共前缀横跨两个串。之后分别枚举回文串的中点,以及回文串长度是奇数还是偶数,看一下对应位置的最长公共前缀即可。这里的求最长公共前缀要处理RMQ问题,线段树固然可以解决,但是...
分类:其他好文   时间:2014-09-26 22:10:08    阅读次数:142
【Leet Code】Palindrome Number
Palindrome NumberTotal Accepted:19369Total Submissions:66673My SubmissionsDetermine whether an integer is a palindrome. Do this without extra space.推断...
分类:其他好文   时间:2014-09-25 14:43:19    阅读次数:137
poj 1159 -- Palindrome
PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:53250Accepted:18396DescriptionA palindrome is a symmetrical string, that is, a string ...
分类:其他好文   时间:2014-09-25 14:30:59    阅读次数:150
poj 1156 Palindrome
PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:51631Accepted:17768DescriptionA palindrome is a symmetrical string, that is, a string ...
分类:其他好文   时间:2014-09-22 17:15:22    阅读次数:267
【LeetCode】Palindrome Partitioning II
Palindrome Partitioning IIGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a p...
分类:其他好文   时间:2014-09-19 22:21:56    阅读次数:261
Leetcode: Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example,...
分类:其他好文   时间:2014-09-19 07:42:35    阅读次数:212
Leetcode: Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
分类:其他好文   时间:2014-09-19 06:35:45    阅读次数:233
Valid Palindrome
[leetcode]Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases....
分类:其他好文   时间:2014-09-17 23:24:22    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!