Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]...
分类:
其他好文 时间:
2015-04-07 17:42:16
阅读次数:
94
??
问题描述:
Implement
atoi to convert a string to an integer.
Hint: Carefullyconsider all possible input
cases. If you want a challenge, please do not seebelow and ask yourself what are the p...
分类:
其他好文 时间:
2015-04-07 17:41:26
阅读次数:
133
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-04-07 10:09:29
阅读次数:
91
Given a set of distinct integers, S , return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
For exam...
分类:
其他好文 时间:
2015-04-07 10:05:03
阅读次数:
127
一:Unique paths I
题目:
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplic...
分类:
其他好文 时间:
2015-04-06 15:44:07
阅读次数:
122
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2015-04-06 15:30:40
阅读次数:
107
Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not co...
分类:
其他好文 时间:
2015-04-06 15:29:43
阅读次数:
123
1.Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],[...
分类:
其他好文 时间:
2015-04-06 15:25:46
阅读次数:
137
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2015-04-05 15:53:15
阅读次数:
107
Problem Description
A certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desirable to transport as much goods as possible each trip. Unfortunately, one cannot always use the roads in the shor...
分类:
编程语言 时间:
2015-04-05 09:16:13
阅读次数:
208