Given an array of distinct integers candidates and a target integer target, return all unique combinations of candidates where the chosen numbers sum to target.
The same number may be chosen from candidates an unlimited number of times. Two combinations are unique if the frequency of at least one chosen number is different.
The answer may be returned in any order.
Input: candidates = [2, 3, 6, 7], target = 7 Output: [[2, 2, 3], [7]] Explanation: 2 + 2 + 3 = 7 and 7 = 7 are the only two ways.
Input: candidates = [2, 3, 5], target = 8 Output: [[2, 2, 2, 2], [2, 3, 3], [3, 5]] Explanation: Three combinations each summing to 8.
Input: candidates = [2], target = 1 Output: [] Explanation: No combination of 2s can sum to 1.
candidates are distinctcandidates = [2, 3, 6, 7], target = 7