Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,3],...
分类:
其他好文 时间:
2014-09-09 21:17:39
阅读次数:
205
Letter Combinations of a Phone Number
Total Accepted: 15964 Total
Submissions: 60700My Submissions
Given a digit string, return all possible letter combinations that the number could repr...
分类:
其他好文 时间:
2014-09-09 13:13:39
阅读次数:
191
[leetcode]Letter Combinations of a Phone Number...
分类:
其他好文 时间:
2014-09-09 12:49:58
阅读次数:
224
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
在1 - 10 中,求出 7 个数的排列组合。出现了超时,而超时的原因是有好多重复情况,复杂度上来说,和答案的复杂度是一样的,但是答案中重复了太多了,体会下。超时1:class Solution {public: vector > combine(int n, int k) { ...
分类:
其他好文 时间:
2014-09-06 22:28:03
阅读次数:
363
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...
分类:
其他好文 时间:
2014-09-06 18:40:43
阅读次数:
224
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((...
分类:
其他好文 时间:
2014-09-06 16:05:23
阅读次数:
182
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb...
分类:
其他好文 时间:
2014-09-05 17:35:41
阅读次数:
227
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
分类:
其他好文 时间:
2014-09-04 22:17:00
阅读次数:
185