码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
zoj2000 Palindrome Numbers
Palindrome Numbers Time Limit: 2 Seconds      Memory Limit: 65536 KB A palindrome is a word, number, or phrase that reads the same forwards as backwards. For example, the name "anna" is a palind...
分类:其他好文   时间:2015-04-16 09:10:30    阅读次数:143
9. 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?...
分类:其他好文   时间:2015-04-15 23:20:59    阅读次数:159
LeetCode【125】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-04-15 22:59:23    阅读次数:146
LeetCode【9】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...
分类:其他好文   时间:2015-04-15 21:25:08    阅读次数:112
[LeetCode] 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-04-13 18:23:52    阅读次数:105
LeetCode the longest palindrome substring
回文检测,参考http://blog.csdn.net/feliciafay/article/details/16984031使用时间复杂度和空间复杂度相对较低的动态规划法来检测,具体的做法图一 偶数个回文字符情况图二 奇数个回文字符情况核心就是如果一个子串是回文,如果分别向回文左右侧扩展一个字符相...
分类:其他好文   时间:2015-04-12 20:52:05    阅读次数:125
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-04-12 17:30:50    阅读次数:99
Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.Analyse:判断一个整数是否是回文数。注意负数都不是回文数。 1 class Solution { 2 public: 3 bool isP...
分类:其他好文   时间:2015-04-12 14:41:36    阅读次数:124
LeetCode: Palindrome Number
Title :Determine whether an integer is a palindrome. Do this without extra space.思路1 : 将数字翻转,然后看是否相等。是否越界的问题,如果真是回文串是不会越界的class Solution {public: i...
分类:其他好文   时间:2015-04-12 11:52:10    阅读次数:99
#9 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.看到题目第一想法是将数字倒过来相减,看是否为0,但是会超时。原因是大部分可能并不是,所以循环中间就退出循环了。目前这个程序是按最左位与最右位逐次比较。代...
分类:其他好文   时间:2015-04-11 20:39:13    阅读次数:115
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!