Given two integers n and k, return all possible combinations of k numbers out of 1 … n.
Example
Input: n = 4, k = 2
Output:
1 | [ |
Code
1 | public List<List<Integer>> combine(int n, int k) { |
写BUG的程序猿
Given two integers n and k, return all possible combinations of k numbers out of 1 … n.
Input: n = 4, k = 2
Output:
1 | [ |
1 | public List<List<Integer>> combine(int n, int k) { |