Skip to content

Commit 0e8b614

Browse files
committed
Create README - LeetHub
1 parent a4d6ba1 commit 0e8b614

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

0077-combinations/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<h2><a href="https://leetcode.com/problems/combinations">77. Combinations</a></h2><h3>Medium</h3><hr><p>Given two integers <code>n</code> and <code>k</code>, return <em>all possible combinations of</em> <code>k</code> <em>numbers chosen from the range</em> <code>[1, n]</code>.</p>
2+
3+
<p>You may return the answer in <strong>any order</strong>.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre>
9+
<strong>Input:</strong> n = 4, k = 2
10+
<strong>Output:</strong> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
11+
<strong>Explanation:</strong> There are 4 choose 2 = 6 total combinations.
12+
Note that combinations are unordered, i.e., [1,2] and [2,1] are considered to be the same combination.
13+
</pre>
14+
15+
<p><strong class="example">Example 2:</strong></p>
16+
17+
<pre>
18+
<strong>Input:</strong> n = 1, k = 1
19+
<strong>Output:</strong> [[1]]
20+
<strong>Explanation:</strong> There is 1 choose 1 = 1 total combination.
21+
</pre>
22+
23+
<p>&nbsp;</p>
24+
<p><strong>Constraints:</strong></p>
25+
26+
<ul>
27+
<li><code>1 &lt;= n &lt;= 20</code></li>
28+
<li><code>1 &lt;= k &lt;= n</code></li>
29+
</ul>

0 commit comments

Comments
 (0)