40 Total composition II

Title: Given an array of candidates and the number one goal target, you can find all the candidates for the target numbers and combinations. Each number candidates used only once in each combination.
Note: All figures (including the target number) are positive integers. Solution Set can not contain duplicate combinations thereof.

Source: https: //leetcode-cn.com/problems/combination-sum-ii/

Act one: their own code

Ideas:

 

Guess you like

Origin www.cnblogs.com/xxswkl/p/11953336.html