leetcode 39. Combination Sum (dfs,求所有的组合,和为定值,每个数可以重复用)

2017年4月13日 0 作者 CrazyKK

Given a set of candidate numbers (C) (without duplicates) 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 times.


  • All numbers (including target) will be positive integers.
  • The solution set must not contain duplicate combinations.