码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
Leetcode6: 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? (ie, -1) If you are thinking of convertin...
分类:其他好文   时间:2015-04-11 18:02:02    阅读次数:123
Palindrome Partitioning II--LeetCode
题目: 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-04-11 18:01:45    阅读次数:137
Palindrome Partitioning--LeetCode
题目: 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-04-11 16:22:37    阅读次数:129
回文串区间dp
UVa 10739 String to Palindrome(经典回文串区间DP)题意:给定一个字符串,可以对其进行删除,插入,替换操作。问最少经过几次操作,可以使这个字符串变成回文字符串。思路:看得别人的 题解,最优化问题,用较为直接的方法处理时发现情况很复杂,很多时候就要考虑动态规划了。先从整体...
分类:其他好文   时间:2015-04-11 13:14:52    阅读次数:123
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: Pan...
分类:其他好文   时间:2015-04-09 00:58:05    阅读次数:128
uva 10617 Again Palindrome (DP)
uva 10617 Again Palindrome题目大意:给出一段字符串,可进行删除操作,可以删除任意位置任意个数(可以是0)的字符。问,进行删除操作使原本字符串变成回文字符串,有几种方式。解题思路:dp[i][j]=1(i==j)单独一个字符也是回文字符串dp[i][j] = 1 (i == j)单独一个字符也是回文字符串s[i]!=s[j]时,dp[i][j]=dp[i+1][j]+dp[i...
分类:其他好文   时间:2015-04-08 21:34:45    阅读次数:135
LeetCode—Palindrome Number 数字是否是回文数字
Determine whether an integer is a palindrome. Do this without extra space. 检测当前数字是否是回文数字,同时不能增加额外的内存空间,这里一个注意的点就是 负数 都不可能是回文数字 然后是检测出来每一位数字进行比较 代码还是写得比较繁琐,主要的一个点就是数字的位数是基数位和偶数位的时候处理的过程是不同的 c...
分类:其他好文   时间:2015-04-08 16:37:01    阅读次数:115
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","...
分类:其他好文   时间:2015-04-08 15:06:58    阅读次数:79
LeetCode #Valid Palindrome#
LeetCode #Valid Palindrome# 我的Python解答: """ Programmer : EOF e-mail : jasonleaster@gmail.com Date : 2015.04.07 File : vp.py """ import string ...
分类:其他好文   时间:2015-04-07 17:49:59    阅读次数:99
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-04-07 17:01:07    阅读次数:160
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!