Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 364 Bytes

File metadata and controls

15 lines (11 loc) · 364 Bytes

Problem 15: The Combination Picker (Combinations)

Problem Statement

Given two integers n and k, return all possible combinations of k numbers chosen from the range [1, n].

Input Format

  • Two integers n and k.

Constraints

  • 1 <= n <= 20
  • 1 <= k <= n

Example

Input: n = 4, k = 2
Output: [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]