# Problem Definition

## Description

Given a list of items with values and weights, as well as a max weight, find the maximum value you can generate from items where the sum of the weights is less than the max.

Eg.

```plaintext
items = {(w:1, v:6), (w:2, v:10), (w:3, v:12)}

maxWeight = 5

knapsack(items, maxWeight) = 22
```

## Notes

1. [YT Video - Byte By Byte - Interview Question: 0-1 Knapsack](https://www.youtube.com/watch?v=YRBON9sIZ2Y)
2. [Byte by Byte - 0-1 Knapsack](https://www.byte-by-byte.com/01knapsack/)
3. [Geeks for Geeks - 0-1 Knapsack Problem | DP-10](https://www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/)
4. [LeetCode discussion - similar problem - 416. Partition Equal Subset Sum - 0/1 knapsack detailed explanation](https://leetcode.com/problems/partition-equal-subset-sum/discuss/90592/01-knapsack-detailed-explanation)
5. [YT Video - GeeksforGeeks - 0 1 Knapsack Problem - Approach to write the code (Dynamic Programming)](https://www.youtube.com/watch?v=ywiH-zRH1mA)
6. [YT Video - Tushar Roy - 0/1 Knapsack Problem Dynamic Programming](https://www.youtube.com/watch?v=8LusJS5-AGo)
7. [GitHub - mission-peace - Knapsack01](https://github.com/mission-peace/interview/blob/master/src/com/interview/dynamic/Knapsack01.java)