Skip to content

Commit e6dde6e

Browse files
authored
Update readme.md
1 parent ee65772 commit e6dde6e

File tree

1 file changed

+19
-5
lines changed
  • src/main/java/g0201_0300/s0216_combination_sum_iii

1 file changed

+19
-5
lines changed

src/main/java/g0201_0300/s0216_combination_sum_iii/readme.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,34 @@ Return _a list of all possible valid combinations_. The list must not contain th
1515

1616
**Output:** \[\[1,2,4\]\]
1717

18-
**Explanation:** 1 + 2 + 4 = 7 There are no other valid combinations.
18+
**Explanation:**
19+
20+
1 + 2 + 4 = 7
21+
There are no other valid combinations.
1922

2023
**Example 2:**
2124

2225
**Input:** k = 3, n = 9
2326

2427
**Output:** \[\[1,2,6\],\[1,3,5\],\[2,3,4\]\]
2528

26-
**Explanation:** 1 + 2 + 6 = 9 1 + 3 + 5 = 9 2 + 3 + 4 = 9 There are no other valid combinations.
29+
**Explanation:**
30+
31+
1 + 2 + 6 = 9
32+
1 + 3 + 5 = 9
33+
2 + 3 + 4 = 9
34+
There are no other valid combinations.
2735

2836
**Example 3:**
2937

3038
**Input:** k = 4, n = 1
3139

3240
**Output:** \[\]
3341

34-
**Explanation:** There are no valid combinations. Using 4 different numbers in the range \[1,9\], the smallest sum we can get is 1+2+3+4 = 10 and since 10 > 1, there are no valid combination.
42+
**Explanation:**
43+
44+
There are no valid combinations.
45+
Using 4 different numbers in the range [1,9], the smallest sum we can get is 1+2+3+4 = 10 and since 10 > 1, there are no valid combination.
3546

3647
**Example 4:**
3748

@@ -47,9 +58,12 @@ Return _a list of all possible valid combinations_. The list must not contain th
4758

4859
**Output:** \[\[1,2,3,4,5,6,7,8,9\]\]
4960

50-
**Explanation:** 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45 There are no other valid combinations.
61+
**Explanation:**
62+
63+
1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45
64+
There are no other valid combinations.
5165

5266
**Constraints:**
5367

5468
* `2 <= k <= 9`
55-
* `1 <= n <= 60`
69+
* `1 <= n <= 60`

0 commit comments

Comments
 (0)