leetcode 40. Combination Sum II (枚举子集,和为定值)

Posted by 111qqz on Wednesday, April 12, 2017

TOC

  * Total Accepted: **106670**
  * Total Submissions: **329718**
  * Difficulty: **Medium**
  * Contributor: **LeetCode**

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 number in C may only be used once in the combination.

Note:

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

题意:若干正数,求所有和为target的组合。

思路:枚举子集,用和剪枝。

「真诚赞赏,手留余香」

111qqz的小窝

真诚赞赏,手留余香

使用微信扫描二维码完成支付