Reach a target, reuse allowed
Given a list candidates of distinct positive integers and a positive integer target, return every combination of candidates that adds up to target. Any candidate may be used as many times as you like. Two combinations are the same if they use the same numbers the same number of times, so return each one once; the order of combinations and of numbers inside them does not matter.
1 ≤ len(candidates) ≤ 10, 1 ≤ candidates[i], target ≤ 40.
Examples
sum_combinations([2,3,6,7], 7)→[[2,2,3],[7]]sum_combinations([2,3,5], 8)→[[2,2,2,2],[2,3,3],[3,5]]sum_combinations([2], 1)→[]