Combination Sum

Given an array of distinct integers candidates and an integer target, return every unique combination of numbers where the chosen values add up to target.

You may pick the same number from candidates as many times as needed.

Two combinations are considered different if their frequency counts differ for at least one chosen number.

Examples
Input: [[2,3,6,7],7]
Output: [[2,2,3],[7]]
Hints
Related Problems

Combination Sum

Given an array of distinct integers `candidates` and an integer `target`, return every unique combination of numbers where the chosen values add up to `target`.