Introduction to Knapsack

Why this family matters

You know 0/1 knapsack: pick items to maximize value under a weight limit.

What if items have both weight AND volume constraints? What if you must pick exactly kk items? Each change needs a different state design.

By the end of this section, you can recognize knapsack variants.

unnamed - 2026-01-20T062054.003.jpg