Problem
Find every combination of exactly `k` different numbers chosen from 1 to 9 that add up to n. Each number can be used at most once. Return the combinations in any order, with no combination listed twice.
Example 1
- Input
- k = 3, n = 7
- Output
- [[1, 2, 4]]
Example 2
- Input
- k = 3, n = 9
- Output
- [[1, 2, 6], [1, 3, 5], [2, 3, 4]]
Example 3
- Input
- k = 4, n = 1
- Output
- []
Constraints
2 <= k <= 91 <= n <= 60