We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ff866e commit 5428da7Copy full SHA for 5428da7
knapsack/knapsack.py
@@ -47,8 +47,8 @@ def knapsack_recur(capacity: int, counter: int) -> int:
47
# then this item cannot be included in the optimal solution,
48
# else return the maximum of two cases:
49
# (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
+ # (2) nth item included one or more times (0-N), if allow_repetition is True
+ # nth item included only once (0-1), if allow_repetition is False
52
if weights[counter - 1] > capacity:
53
return knapsack_recur(capacity, counter - 1)
54
else:
0 commit comments