2022-05-25
Description
Input: n = 4, k = 2
Output:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]Input: n = 1, k = 1
Output: [[1]]Solution
Approach #0: DFS
Approach #1: Alphabetical Order
Description
Solution
Approach #0
Approach #1
Description
Solution
Approach #0: Too Slow
Approach #1: Much Better
Last updated