Skip to content

Commit 5428da7

Browse files
Update knapsack.py
1 parent 0ff866e commit 5428da7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

knapsack/knapsack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def knapsack_recur(capacity: int, counter: int) -> int:
4747
# then this item cannot be included in the optimal solution,
4848
# else return the maximum of two cases:
4949
# (1) not included
50-
# (2) nth item included one or more times (0-N), if allow_repetition is true
51-
# nth item included only once (0-1), if allow_repetition is false
50+
# (2) nth item included one or more times (0-N), if allow_repetition is True
51+
# nth item included only once (0-1), if allow_repetition is False
5252
if weights[counter - 1] > capacity:
5353
return knapsack_recur(capacity, counter - 1)
5454
else:

0 commit comments

Comments
 (0)