Example 1
- Input
- n = 4, k = 2
- Output
- [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
Choosing 1 produces [1, 2], [1, 3] and [1, 4]; choosing 2 next produces [2, 3] and [2, 4]; choosing 3 produces [3, 4]. These are the six different pairs. Reversing a pair does not create a new group.