
Backtracking
文章平均质量分 58
Arcome
这个作者很懒,什么都没留下…
展开
-
LeetCode #78 - Subsets - Medium
ProblemGiven a set of distinct integers, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.ExampleFor example,If nums = [1,2,3], a solution is:[ [3], [1原创 2016-12-26 19:55:34 · 518 阅读 · 0 评论 -
LeetCode #90 - Subsets II - Medium
Subsets Series Subsets I: http://blog.youkuaiyun.com/arcome/article/details/53888806 Subsets II: ProblemGiven a collection of integers that might contain duplicates, nums, return all possible subsets原创 2016-12-26 20:01:22 · 500 阅读 · 0 评论 -
LeetCode #216 - Combination Sum III - Medium
Combination Sum Series Combination Sum I: Combination Sum II: Combination Sum III: ProblemFind all possible combinations of k numbers that add up to a number n, given that only numbers f原创 2016-12-20 07:56:49 · 711 阅读 · 0 评论 -
LeetCode #39 - Combination Sum - Medium
Combination Sum Series Combination Sum I: Combination Sum II: Combination Sum III: http://blog.youkuaiyun.com/Arcome/article/details/53758448ProblemGiven a set of candidate numbers (C) (without原创 2016-12-26 20:05:22 · 487 阅读 · 0 评论 -
LeetCode #22 - Generate Parentheses - Medium
ProblemGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.Examplegiven n = 3, a solution set is:[ "((()))", "(()())", "(())()", "()(())",原创 2016-12-20 08:00:20 · 467 阅读 · 0 评论 -
LeetCode #46 - Permutations - Medium
Permutations Series Permutations I: Permutations II: ProblemGiven a collection of distinct numbers, return all possible permutations.Example[1,2,3] have the following permutations:[ [1,2,3原创 2016-12-20 08:03:56 · 427 阅读 · 0 评论 -
LeetCode #77 - Combinations - Medium
ProblemGiven two integers n and k, return all possible combinations of k numbers out of 1 ... n.ExampleFor example,If n = 4 and k = 2, a solution is:[ [2,4], [3,4], [2,3], [1,2], [1,3], [原创 2016-12-20 08:12:02 · 401 阅读 · 0 评论