https://oj.leetcode.com/problems/combinations/
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:
[ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ]
'풀어본 Algorithm 문제 정리' 카테고리의 다른 글
[OJ.leetcode] add two numbers (1) | 2014.08.21 |
---|---|
[OJ.leetcode] search-in-rotated-sorted-array (0) | 2014.08.19 |
[OJ.leetcode] sort-colors (1) | 2014.08.17 |
[OJ.leetcode] substring-with-concatenation-of-all-words (1) | 2014.08.15 |
[OJ.leetcode] flatten-binary-tree-to-linked-list (1) | 2014.08.14 |