Concept Flow - 0 1 Knapsack Problem
Start with empty knapsack
For each item i
For each weight w from 0 to max capacity
Decide: Include item i or not?
Include
Update DP table with max value
Repeat for all items
Final answer in DP[max_items
We fill a table step-by-step deciding for each item and weight if including the item gives better value than excluding it.
