Flight Lab / Graduate algorithms / 01
Lesson 01 of 05 · about 4 min
Dynamic programming stores the best answer for every smaller amount and reuses it. For coins, the cell for an amount is one plus the best cell you can reach by paying with one coin.
The till holds pennies, nickels, and dimes. Enter the fewest coins that make 12 cents.