Skip to content

Commit 29fe30b

Browse files
Update src/dynamic_programming/knapsack.md
Co-authored-by: Oleksandr Kulkov <adamant.pwn@gmail.com>
1 parent 142c3cc commit 29fe30b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dynamic_programming/knapsack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Consider the following example:
1313
There are $n$ distinct items and a knapsack of capacity $W$. Each item has 2 attributes, weight ($w_{i}$) and value ($v_{i}$).
1414
You have to select a subset of items to put into the knapsack such that the total weight does not exceed the capacity $W$ and the total value is maximized.
1515

16-
In the above example, since each object has only two possible states (taken or not taken),
16+
In the example above, since each object has only two possible states (taken or not taken),
1717
correspoding to binary 0 and 1, this type of problem is called "0-1 knapsack problem".
1818

1919
## 0-1 Knapsack

0 commit comments

Comments
 (0)