题目: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,...
分类:
其他好文 时间:
2015-07-07 18:42:12
阅读次数:
101
public class Solution { public List res; public StringBuilder seq; public List letterCombinations(String digits) { //本题类似于全排列的变形,全排列的每...
分类:
其他好文 时间:
2015-07-07 14:28:47
阅读次数:
123
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:
“((()))”, “(()())”, “(())()”, “()(())”, “(...
分类:
其他好文 时间:
2015-07-07 13:00:44
阅读次数:
105
Find all possible combinations of k numbers that add up to a number n, given that only numbers
from 1 to 9 can be used and each combination should be a unique set of numbers.
Ensure that numbers wi...
分类:
其他好文 时间:
2015-07-07 11:07:18
阅读次数:
94
Generate Parentheses
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:
"((()))", "(()())"...
分类:
其他好文 时间:
2015-07-07 09:30:46
阅读次数:
106
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited number of t...
分类:
其他好文 时间:
2015-07-06 21:45:12
阅读次数:
107
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Digit st...
分类:
其他好文 时间:
2015-07-04 14:02:10
阅读次数:
282
1. Question给一个数字字符串,按照电话上各个数字对应的字母,返回该字符串代表的所有可能的字母组合。Given a digit string, return all possible letter combinations that the number could represent.A ...
分类:
其他好文 时间:
2015-07-03 23:23:10
阅读次数:
121
Generate Parentheses:
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:
"((()))", "(()())"...
分类:
其他好文 时间:
2015-07-03 09:22:17
阅读次数:
142
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-06-23 23:15:54
阅读次数:
132