Combinations

Given integers n and k, return all combinations of k distinct numbers chosen from 1..n. Each combination and the list of combinations may be returned in any order.

Examples
Input: [4,2]
Output: [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
Hints

Combinations

Given integers `n` and `k`, return all combinations of `k` distinct numbers chosen from `1..n`. Each combination and the list of combinations may be returned in any order.