9. Palindrome Number 题目: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative ...
分类:
其他好文 时间:
2018-04-06 19:36:00
阅读次数:
175
给定一个字符串 s,将 s 分割成一些子串,使每个子串都是回文串。返回 s 符合要求的的最少分割次数。例如,给出 s = "aab",返回 1 因为进行一次分割可以将字符串 s 分割成 ["aa","b"] 这样两个回文子串。详见:https://leetcode.com/problems/pali ...
分类:
其他好文 时间:
2018-04-05 19:21:45
阅读次数:
157
给定一个字符串 s,将 s 分割成一些子串,使每个子串都是回文串。返回 s 所有可能的分割方案。例如,给出 s = "aab",返回[ ["aa","b"], ["a","a","b"]]详见:https://leetcode.com/problems/palindrome-partitioning ...
分类:
其他好文 时间:
2018-04-05 18:36:50
阅读次数:
141
1 题目 Determine whether an integer is a palindrome. Do this without extra space. 判断一个数字是否是回文数字,不用额外的空间。 2 分析 如果允许使用额外的空间,那么就将数字头尾颠倒,然后判断相等。但是缺陷在于,不能用在6 ...
分类:
其他好文 时间:
2018-03-24 11:34:32
阅读次数:
138
Given a string s, return all the palindromic permutations (without duplicates) of it. Return an empty list if no palindromic permutation could be form ...
分类:
其他好文 时间:
2018-03-23 13:04:31
阅读次数:
237
Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? 判断单链表是否是回文的 C++(25ms): ...
分类:
其他好文 时间:
2018-03-20 18:02:54
阅读次数:
137
Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindro ...
分类:
其他好文 时间:
2018-03-18 21:41:39
阅读次数:
101
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 ...
分类:
其他好文 时间:
2018-03-13 10:22:02
阅读次数:
119
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2744 题目描述: A regular palindrome is a string of numbers or letters that is the same ...
分类:
其他好文 时间:
2018-03-11 14:36:26
阅读次数:
168
问题链接 "LeetCode 9. Palindrome Number" 题目解析 判断一个数字是否是回文数字。 解题思路 题目已经给出很多提示和注意事项,还要求不能使用额外空间,其实就是想说请直接在数字上操作,不能转换成字符串。另外题目说明直接反转数字会超出范围,其实用long long表示反转结 ...
分类:
其他好文 时间:
2018-03-11 14:25:10
阅读次数:
112