Medium Problemsknapsackoptimization

0-1 Knapsack Problem

Given n items, each with a weight and a value, and a knapsack with a fixed weight capacity, choose a subset of items, taking each item whole or not at all, to maximize total value without exceeding the capacity.

Do this lesson first: coin change

The full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.