leetcode 77 Combinations
Given two integers n and k, return all possible combinations of k numbers out of 1 … n.
Example:
1 | Input: n = 4, k = 2 |
- bfs回溯就好了
1 | class Solution { |
Given two integers n and k, return all possible combinations of k numbers out of 1 … n.
Example:
1 | Input: n = 4, k = 2 |
1 | class Solution { |