Determine whether an integer is a palindrome. Do this without extra space. ...
分类:
其他好文 时间:
2016-10-01 12:48:19
阅读次数:
105
题目: Determine whether an integer is a palindrome. Do this without extra space. 官方难度: Easy 翻译: 判断一个整数是否为回文结构,不使用额外空间。 思路: 1.回文结构的整数,与之前回文字符串类似,形如1,121, ...
分类:
其他好文 时间:
2016-09-28 01:53:44
阅读次数:
113
如果给定的字符串是回文,返回true,反之,返回false。 如果一个字符串忽略标点符号、大小写和空格,正着读和反着读一模一样,那么这个字符串就是palindrome(回文)。 注意你需要去掉字符串多余的标点符号和空格,然后把字符串转化成小写来验证此字符串是否为回文。 函数参数的值可以为"racec ...
分类:
其他好文 时间:
2016-09-26 17:51:44
阅读次数:
118
Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e.words[i] + ...
分类:
其他好文 时间:
2016-09-22 06:33:21
阅读次数:
150
Given a string, determine if a permutation of the string could form a palindrome. For example,"code" -> False, "aab" -> True, "carerac" -> True. Analy ...
分类:
其他好文 时间:
2016-09-20 11:53:51
阅读次数:
124
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes ...
分类:
其他好文 时间:
2016-09-20 06:49:11
阅读次数:
141
Determine whether an integer is a palindrome. Do this without extra space. 判断一个数是否是回文数,不能用额外的空间 我第一次做的时候,没有考虑到不能用额外的空间(空间复杂度为(n)),用了一个字符串来保存数字,而且题目的设定 ...
分类:
其他好文 时间:
2016-09-19 19:21:02
阅读次数:
123
12050 Palindrome NumbersA palindrome is a word, number, or phrase that reads the same forwards as backwards. For example,the name “anna” is a palindro ...
分类:
其他好文 时间:
2016-09-19 01:28:13
阅读次数:
172
Description A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to writ ...
分类:
编程语言 时间:
2016-09-16 22:38:02
阅读次数:
172
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl ...
分类:
其他好文 时间:
2016-09-16 10:08:01
阅读次数:
141