码迷,mamicode.com
首页 >  
搜索关键字:palindrome partition    ( 4210个结果
【LeetCode】Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of ...
分类:其他好文   时间:2014-08-01 13:45:32    阅读次数:163
Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:其他好文   时间:2014-08-01 12:49:41    阅读次数:186
Palindrome Partitioning leetcode java
题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For exam....
分类:编程语言   时间:2014-08-01 10:30:01    阅读次数:218
HDU 4651 Partition 整数划分,可重复情况
PartitionTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 842Accepted Submission(s): 478 Problem...
分类:其他好文   时间:2014-08-01 10:29:51    阅读次数:261
Valid Palindrome leetcode java
题目:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: ....
分类:编程语言   时间:2014-08-01 10:27:11    阅读次数:310
[LeetCode 题解]: Partition List
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:其他好文   时间:2014-08-01 04:40:11    阅读次数:166
xtu summer individual 1 E - Palindromic Numbers
E -Palindromic NumbersTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluDescriptionA palindromic number or numeral palindrome is a 'symm...
分类:其他好文   时间:2014-07-31 23:36:50    阅读次数:360
求最小的k个数
和快速排序有点类似,利用快速排序的划分算法, 划分算法见http://blog.csdn.net/buyingfei8888/article/details/8997803 根据int partition(int number[],int start,int end);返回值为数组下标,大小为index,index左边值均小于number【index】,右边均大于number【index】,若...
分类:其他好文   时间:2014-07-31 17:05:16    阅读次数:191
HDU 1513 Palindrome
题目就是给一个字符串问最少插入多少个字符能让原字符串变为回文字符串。算法:用原串的长度减去原串与翻转后的串的最大公共字串的长度,就是所求答案。 1 //#define LOCAL 2 #include 3 #include 4 #include 5 #include 6 using name...
分类:其他好文   时间:2014-07-31 12:24:36    阅读次数:220
HDU 3068 最长回文 Manacher算法
Manacher算法是个解决Palindrome问题的O(n)算法,可以说是个超级算法了,秒杀其他一切Palindrome解决方案,包括复杂的后缀数组。 网上很多解释,这里总结一下思想重点: 1 原字符串的字符间插入新的字符, 如#,方便统一所有的字符中心,比如aa和aba的字符中心不一样的,aa的字符中心可以说是aa,而aba的中心则是b,而插入#之后,aa成#a#a#,其中...
分类:其他好文   时间:2014-07-31 03:04:15    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!