码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
[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: Panama" is a palindrome. "race a car" is not a ...
分类:其他好文   时间:2015-05-07 16:48:34    阅读次数:78
LeetCode (30) 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-05-07 14:30:59    阅读次数:119
LeetCode 9 Palindrome Number
Problem: 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 thinkin...
分类:其他好文   时间:2015-05-07 12:28:14    阅读次数:143
uva 11151 Longest Palindrome (最长公共子序列)
uva 11151 Longest PalindromeA palindrome is a string that reads the same from the left as it does from the right. For example, I, GAG and MADAM are palindromes, but ADAM is not. Here, we consider also...
分类:其他好文   时间:2015-05-06 17:56:58    阅读次数:116
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 co...
分类:其他好文   时间:2015-05-06 13:26:23    阅读次数:115
[LeetCode 125] Valid Palindrome
https://leetcode.com/problems/valid-palindrome/ Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring...
分类:其他好文   时间:2015-05-05 12:13:38    阅读次数:94
POJ - 1159 - Palindrome (LCS + 优化)
题目传送:Palindrome 思路:一看题目思路很清晰,就是求出字符串s和倒转s后的字符串t的最长公共子序列,但是一看空间开销有点大,如果开int就会爆,5000*5000有100MB了,这里可以开short int,差不多正好可以过去,还有一种做法就是弄一个滚动数组,因为求LCS,根据状态转移方程可以知道,只需要前一行和当前行就行了,所以开个2*5005就OK了,具体看代码 ...
分类:其他好文   时间:2015-05-05 09:00:35    阅读次数:121
Palindrome Number
https://leetcode.com/problems/palindrome-number/Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some ...
分类:其他好文   时间:2015-05-04 21:35:51    阅读次数:127
【Valid Palindrome】cpp
题目:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: P...
分类:其他好文   时间:2015-05-03 23:27:29    阅读次数:113
leetcode 9. 判断整数是否是回数 Palindrome Number
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space. 注:回数是指正读和倒读都一样的数:需要注意点 (1)负数不是回数 (2)个位数都是回数 思路: (1)使用前一题的整数的倒序,将一个数倒序,然后和原值比较:存在的问题是可能有溢出...
分类:其他好文   时间:2015-05-03 17:34:33    阅读次数:114
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!