Palindrome Partitioning
Total Accepted: 18096 Total
Submissions: 69797My Submissions
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all...
分类:
其他好文 时间:
2014-09-09 18:29:29
阅读次数:
205
Problem Description:
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2...
分类:
其他好文 时间:
2014-09-09 16:17:29
阅读次数:
200
HDU 1390 Binary Numbers(数学题)...
分类:
其他好文 时间:
2014-09-09 16:08:09
阅读次数:
187
题目链接:hdu 4731 Minimum palindrome
题目大意:给定n和m,m表示m种字符。求一个长度为n字典序最小的字符串,满足存在的回文子串长度尽量短。
解题思路:构造。
m = 1:那么不管n为多少,肯定都用a构造m > 2: 用abcabc...构造出来的串回文子串长度最多为1m = 2:对于n
#include
#include
#include
u...
分类:
其他好文 时间:
2014-09-09 13:25:08
阅读次数:
260
题目原文:
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 conv...
分类:
其他好文 时间:
2014-09-09 13:04:18
阅读次数:
156
[leetcode]Add Two Numbers...
分类:
其他好文 时间:
2014-09-09 12:50:08
阅读次数:
185
Combination SumGiven a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thes...
分类:
其他好文 时间:
2014-09-09 10:54:08
阅读次数:
190
思路: 注意符号,溢出。
思路: 注意负数和溢出情况都是 false. 其余情况,就是反转再判断,参考上题.
分类:
其他好文 时间:
2014-09-09 10:40:08
阅读次数:
179
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique per...
分类:
其他好文 时间:
2014-09-08 00:55:26
阅读次数:
269
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-09-07 23:40:25
阅读次数:
202