码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
LeetCode9——Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. 题目大意 判断一个int是否为回文数,不使用额外的储存空间。 难度系数:容易 实现 int getfactor(int x) { if (x < 10) return 1; int facto...
分类:其他好文   时间:2015-01-27 11:13:47    阅读次数:192
欧拉计划(python) problem 4
Largest palindrome product Problem 4 A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest p...
分类:编程语言   时间:2015-01-27 09:34:40    阅读次数:223
Problem 2902 - palindrome(最长公共字串)
Longest PalindromeTime Limit:3000MS    Memory Limit:0KB    64bit IO Format:%lld & %llu SubmitStatus Description Problem D: Longest Palindrome Time limit: 10 seconds ...
分类:其他好文   时间:2015-01-27 09:32:55    阅读次数:210
Uva 10617 Again Palindrome(区间dp)
Again Palindromes Input: Standard Input Output: Standard Output Time Limit: 2 Seconds   A palindorme is a sequence of one or more characters that reads the same from the left as it does from th...
分类:其他好文   时间:2015-01-26 22:50:54    阅读次数:205
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...
分类:其他好文   时间:2015-01-26 20:56:06    阅读次数:132
[leetcode]Valid Palindrome
Valid Palindrome解题实现。
分类:其他好文   时间:2015-01-26 18:56:46    阅读次数:157
[leetcode]Palindrome Partitioning II
问题描述: Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = "aab", ...
分类:其他好文   时间:2015-01-26 11:53:51    阅读次数:128
[C++]LeetCode: 121 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 [ ...
分类:编程语言   时间:2015-01-25 16:41:55    阅读次数:201
Ural 1297 Palindrome 【最长回文子串】
最长回文子串 相关资料:1、暴力法2、动态规划3、中心扩展4、Manacher法http://blog.csdn.net/ywhorizen/article/details/6629268http://blog.csdn.net/kangroger/article/details/37742639在...
分类:其他好文   时间:2015-01-24 00:29:45    阅读次数:181
URAL 1297. Palindrome(后缀数组求最大回文串)
题目大意:给你一串字符串,让你求出来它存在的最长连续的回文串。 解题思路:先把字符串逆序加到数组中,然后用后缀数组求解。两种方法:1,枚举排名,直接比较rank相同的字符串的位置差是不是len。如果是的话,就记录求解;2,枚举地址,求第i地址与第2*len-i+1的lcp的最大值。 PS:需要注意如果多解输出靠前的字符串。 两种写法写在了一起,分别是Del,和Del1函数。 1...
分类:编程语言   时间:2015-01-23 21:35:50    阅读次数:378
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!