https://leetcode.com/problems/palindrome-partitioning/Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all...
分类:
其他好文 时间:
2015-11-28 18:12:33
阅读次数:
187
1297. Palindrome Time limit: 1.0 second Memory limit: ...
分类:
编程语言 时间:
2015-11-28 16:47:48
阅读次数:
235
Prime PalindromesThe number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as b...
分类:
其他好文 时间:
2015-11-28 13:31:24
阅读次数:
188
题目: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?链接:http://leetcode.com/problems/p...
分类:
其他好文 时间:
2015-11-28 12:06:46
阅读次数:
140
C. Make PalindromeA string is called palindrome if it reads the same from left to right and from right to left. For example "kazak", "oo", "r" and "mi...
分类:
其他好文 时间:
2015-11-28 10:19:22
阅读次数:
152
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2015-11-21 11:48:27
阅读次数:
127
思路:除和求余 取得首位和末尾 比较是否相等。 1 public boolean isPalindrome(int x){ 2 if(x=10){ 7 div*=10; 8 } 9 while(x!=0){10 ...
分类:
其他好文 时间:
2015-11-18 21:10:07
阅读次数:
166
class Solution(object): def isPalindrome(self, x): """ :type x: int :rtype: bool """ if x < 0: return...
分类:
编程语言 时间:
2015-11-11 20:33:41
阅读次数:
150
题目链接: Lightoj 1044 - Palindrome Partitioning题目描述: 给一个字符串,问至少分割多少次?分割出来的子串都是回文串。解题思路: 先把给定串的所有子串是不是回文串处理出来,然后用dp[i] 表示 从起点到串i的位置的最少分割次数,然后结合处理出来的回文串...
分类:
其他好文 时间:
2015-11-11 10:04:04
阅读次数:
233
Palindrome Partitioning IIGiven a strings, cutsinto some substrings such that every substring is a palindrome.Return the minimum cuts needed for a pal...
分类:
其他好文 时间:
2015-11-11 06:21:31
阅读次数:
344