Concept Flow - 0 1 Knapsack Problem
Start with empty knapsack
Consider each item one by one
For each item, check weight vs capacity
If item fits: choose max of (include or exclude item)
If item doesn't fit: exclude item
Store result in DP table
Move to next item
Repeat until all items considered
Final answer at dp[last_item
We build a table to decide for each item and capacity whether to include or exclude the item to maximize value.
