码迷,mamicode.com
首页 >  
搜索关键字:palindrome    ( 1561个结果
leetcode题解 9. Palindrome Number
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
132 Palindrome Partitioning II 分割回文串 II
给定一个字符串 s,将 s 分割成一些子串,使每个子串都是回文串。返回 s 符合要求的的最少分割次数。例如,给出 s = "aab",返回 1 因为进行一次分割可以将字符串 s 分割成 ["aa","b"] 这样两个回文子串。详见:https://leetcode.com/problems/pali ...
分类:其他好文   时间:2018-04-05 19:21:45    阅读次数:157
131 Palindrome Partitioning 分割回文串
给定一个字符串 s,将 s 分割成一些子串,使每个子串都是回文串。返回 s 所有可能的分割方案。例如,给出 s = "aab",返回[ ["aa","b"], ["a","a","b"]]详见:https://leetcode.com/problems/palindrome-partitioning ...
分类:其他好文   时间:2018-04-05 18:36:50    阅读次数:141
leetcode-9. Palindrome Number
1 题目 Determine whether an integer is a palindrome. Do this without extra space. 判断一个数字是否是回文数字,不用额外的空间。 2 分析 如果允许使用额外的空间,那么就将数字头尾颠倒,然后判断相等。但是缺陷在于,不能用在6 ...
分类:其他好文   时间:2018-03-24 11:34:32    阅读次数:138
[LeetCode] 267. Palindrome Permutation II 回文全排列 II
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
234. Palindrome Linked List
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
479. Largest Palindrome Product
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
[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: Pan ...
分类:其他好文   时间:2018-03-13 10:22:02    阅读次数:119
zoj 2744 Palindromes(计算回文子串个数的优化策略)
题目链接: 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
问题链接 "LeetCode 9. Palindrome Number" 题目解析 判断一个数字是否是回文数字。 解题思路 题目已经给出很多提示和注意事项,还要求不能使用额外空间,其实就是想说请直接在数字上操作,不能转换成字符串。另外题目说明直接反转数字会超出范围,其实用long long表示反转结 ...
分类:其他好文   时间:2018-03-11 14:25:10    阅读次数:112
1561条   上一页 1 ... 31 32 33 34 35 ... 157 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!