码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
[LeetCode]131.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”,”b”],...
分类:其他好文   时间:2015-03-02 22:35:33    阅读次数:149
[LeetCode] 009. Palindrome Number (Easy) (C++/Java/Python)
[LeetCode] 009. Palindrome Number (Easy) (C++/Java/Python)...
分类:编程语言   时间:2015-03-01 10:32:57    阅读次数:246
LeetCode131——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","b...
分类:其他好文   时间:2015-02-28 16:29:29    阅读次数:129
poj3974(manacher)
传送门:Palindrome题意:给定一个字符串,求最长回文子串。分析:manach裸题,核心理解mx>i?p[i]=min(p[2*id-i],mx-i):1.#pragma comment(linker,"/STACK:1024000000,1024000000")#include #inclu...
分类:其他好文   时间:2015-02-25 14:09:17    阅读次数:117
SPOJ Problem 5:The Next Palindrome
题目大意:根据给出的数字串求较大的最小回文串 简单题,可以从中间开始比较,如果左边大于右边的话则终止,若右边大于左边的话则中间+1,然后向左边推。输出时按左边复制一遍。#include#includeint t,i,j,l,r,n,pd,q,mid;char s[1000005];int main(...
分类:其他好文   时间:2015-02-24 22:08:52    阅读次数:200
LeetCode 笔记24 Palindrome Partitioning II (智商碾压)
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
分类:其他好文   时间:2015-02-24 13:43:16    阅读次数:150
Part.5【马拉车&扩展KMP】
Manacher(马拉车)是一种求最长回文串的线性算法,复杂度O(n)。网上对其介绍的资料已经挺多了的,请善用搜索引擎。而扩展KMP说白了就是是求模式串和主串的每一个后缀的最长公共前缀【KMP更像是一个自动机】题目:POJ 1159:Palindrome求原字符串最少增加几个字符后可变成回文串,相当...
分类:其他好文   时间:2015-02-21 23:26:15    阅读次数:242
POJ3280Cheapest Palindrome(区间dp)
Language: Default Cheapest Palindrome Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 6227   Accepted: 3032 Description Keeping track of all the cows can...
分类:其他好文   时间:2015-02-21 10:57:18    阅读次数:123
UVa401 Palindromes
Palindromes A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string"ABCDEDCBA"is a palind...
分类:其他好文   时间:2015-02-19 18:38:16    阅读次数:250
Leetcode 131 Palindrome Partitioning
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:其他好文   时间:2015-02-13 06:57:11    阅读次数:112
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!