Combination
Given two integers n _and _k, return all possible combinations of k _numbers out of 1 ... _n.
Example
Note
递归出口:k减到0
start从1开始
Time: O(n^min(k, n - k))
Space: O(n)
Code
Last updated
Given two integers n _and _k, return all possible combinations of k _numbers out of 1 ... _n.
递归出口:k减到0
start从1开始
Time: O(n^min(k, n - k))
Space: O(n)
Last updated