🟡  Combination Sum

<aside> 💡 Run DFS. Iterate over numbers and call DFS with the rest of numbers starting from same number (to allow reuse of number).

</aside>

https://leetcode.com/problems/combination-sum/

function dfs(temp, numbers, remaining) {
  if (remaining === 0) {
    combinations.push([...temp]);
  }

  if (remaining < 0) {
    return;
  }

  for (let i = 0; i < numbers.length; i++) {
    temp.push(numbers[i]);
    dfs(temp, numbers.slice(i), remaining - numbers[i]);
    temp.pop();
  }
}