Skip to content

Commit 3b593f1

Browse files
added doctest in all_combinations.py
1 parent cde8776 commit 3b593f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

backtracking/all_combinations.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ def combination_lists(n: int, k: int) -> list[list[int]]:
1717
>>> combination_lists(n=4, k=2)
1818
[[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]]
1919
>>> combination_lists(n=5, k=3)
20-
[[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 3, 4], [1, 3, 5], [1, 4, 5], [2, 3, 4], [2, 3, 5], [2, 4, 5], [3, 4, 5]]
21-
>>> combination_lists(n=0, k=0)
20+
[[1, 2, 3], [1, 2, 4], [1, 2, 5],
21+
[1, 3, 4], [1, 3, 5], [1, 4, 5],
22+
[2, 3, 4], [2, 3, 5], [2, 4, 5],
23+
[3, 4, 5]]
2224
[]
2325
>>> combination_lists(n=1, k=1)
2426
[[1]]

0 commit comments

Comments
 (0)