Mental Model
We want to pick items with values and weights to maximize value without exceeding weight limit. Each item can be chosen only once.
Analogy: Imagine packing a backpack for a trip. You have limited space and many items. You want to pack the most valuable things without overloading the bag.
Items: [weight: 2, value: 3], [weight: 3, value: 4], [weight: 4, value: 5] Knapsack capacity: 5 Backpack capacity slots: 0 1 2 3 4 5 Values stored for each capacity as we decide items ->
