2.1.6.1.1. What is 0/1 Knapsack Problem?
- Given a knapsack with maximum capacity , and a set consisting of items
- Each item has some weight and benefit value (all , and are integer values)
- Problem: How to pack the knapsack to achieve maximum total value of packed items?
2.1.6.1.2. Solution
2.1.6.1.3. Code
https://gist.github.com/BiruLyu/b7ef86cee3a17427dd4f24e064f9d271