Dynamic Programming (Coin Change) Playground

A table on the mill’s big board filled cell by cell: the truck’s best load (0/1 knapsack) and the fewest coins of change, each cell’s choice and the answer…

Why it matters

DP is behind text diffs, spelling correction (edit distance), routing, scheduling, compression, and many interview questions. The usual mistakes: a greedy shortcut that is sometimes wrong, recursion with no notes that blows up, and a forgotten base case that makes the whole table wrong.

The key idea

Every cell worked out once, from the small ones

Common mistakes

Try it in this playground