Dynamic Programming
0/1 Knapsack
0 practice questions|Medium
When to use it
Maximize capacity-based value combinations by deciding whether to take each element once.
Key Signals & Indicators
- Need to select elements under weight or capacity constraints
- Each element can be chosen at most once (0 or 1 choice)
- Problem exhibits overlapping subproblems (e.g. subset sum)
Pattern Boilerplate
Problems using this pattern
Questions are being tagged
Questions for this pattern are currently being curated — check back soon.