mirror of
https://github.com/onyx-and-iris/grokking-algorithms.git
synced 2024-11-15 17:30:52 +00:00
typo
This commit is contained in:
parent
85481bd3d3
commit
24c2a1984f
@ -22,7 +22,7 @@ def dynamic(items, n):
|
||||
# create table and zero fill it (required for calculations)
|
||||
table = [[0 for _ in range(W + 1)] for _ in range(n + 1)]
|
||||
|
||||
# calcalate all possible max values for items in knapsack
|
||||
# calculate all possible max values for items in knapsack
|
||||
for i in range(1, n + 1):
|
||||
for w in range(1, W + 1):
|
||||
if items[i - 1].weight <= w:
|
||||
|
Loading…
Reference in New Issue
Block a user