The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and
7. Similarly we c...
分类:
其他好文 时间:
2015-06-04 11:56:43
阅读次数:
84
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], [1,2,1], and [2,1,1].这道题是打印一个整...
分类:
其他好文 时间:
2015-06-04 11:52:07
阅读次数:
159
SubsetsTotal Accepted:49965Total Submissions:176963My SubmissionsQuestionSolutionGiven a set of distinct integers,nums, return all possible subsets.No...
分类:
其他好文 时间:
2015-06-04 11:25:26
阅读次数:
105
题目:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representat...
分类:
其他好文 时间:
2015-06-03 15:33:00
阅读次数:
168
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:
1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
It is possible to make £2 in the...
分类:
其他好文 时间:
2015-06-03 12:00:39
阅读次数:
114
Letter Combinations of a Phone Number
题目:
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telepho...
分类:
其他好文 时间:
2015-06-03 11:56:06
阅读次数:
91
unittestTest outcomesTests have 3 possible outcomes:okThe test passes.FAILThe test does not pass, and raises an AssertionError exception.ERRORThe test...
分类:
编程语言 时间:
2015-06-02 21:42:05
阅读次数:
144
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
Return all such possible sentences.
For example, given
s = "...
分类:
其他好文 时间:
2015-06-02 18:07:59
阅读次数:
88
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or
alphabetically, we...
分类:
其他好文 时间:
2015-06-02 09:28:13
阅读次数:
121
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input case...
分类:
其他好文 时间:
2015-06-02 09:25:09
阅读次数:
115