
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) { |

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) { |
近期评论