码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
LeetCode Valid Palindrome
1.题目Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a pali...
分类:其他好文   时间:2015-05-01 18:46:29    阅读次数:129
Palindrome Partitioning
题目:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, ...
分类:其他好文   时间:2015-05-01 00:32:38    阅读次数:150
[LeetCode]-009-Palindrome Number
网址:https://leetcode.com/problems/palindrome-number/ 题意: 判断int数是不是回文. 解法: 先遍历一遍,得到数值位数. 再前后判断是不是回文 注意不能是负数. 代码: https://github.com/LiLane/leetcode/blob/master/c%2B%2B/009-PalindromeNumber-20150...
分类:其他好文   时间:2015-04-30 12:36:59    阅读次数:126
9. Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.类似于reverse integer。public class Solution { public boolean isPalindrome(...
分类:其他好文   时间:2015-04-30 07:36:35    阅读次数:119
LCS POJ 1159 Palindrome
题目传送门 1 /* 2 LCS裸题:长度减去最大相同长度就是要插入的个数 3 */ 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 const int MAXN ...
分类:其他好文   时间:2015-04-29 21:33:35    阅读次数:192
LCS(滚动数组) POJ 1159 Palindrome
题目传送门 1 /* 2 LCS裸题:长度减去最大相同长度就是要插入的个数 3 dp数组二维都开5000的话就会超内存,这里就用到了滚动数组, 4 因为在LCS的计算中,i的变化只相差1,所以可以通过对2取余来进行滚动:) 5 */ 6 #include 7...
分类:编程语言   时间:2015-04-29 21:25:06    阅读次数:216
UVa11404Palindromic Subsequence(最大回文串,区间DP)
UVa11404Palindromic Subsequence(最大回文串,区间DP) Description A Subsequence is a sequence obtained by deleting zero or more characters in a string. A Palindrome is a string which when read from left t...
分类:其他好文   时间:2015-04-29 17:23:29    阅读次数:139
leetcode || 132、Palindrome Partitioning II
problem: 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...
分类:其他好文   时间:2015-04-29 09:56:50    阅读次数:116
LeetCode(9)Palindrome Number
题目: Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to s...
分类:其他好文   时间:2015-04-28 22:53:01    阅读次数:177
leetcode ||131、Palindrome Partitioning
problem: 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", Retur...
分类:其他好文   时间:2015-04-28 18:27:59    阅读次数:104
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!