Monday, October 13, 2014

Combinations

Problem

Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.

For example,
If n = 4 and k = 2, a solution is:

Idea

dfs一次得到一个解.

Solution


No comments:

Post a Comment