Mental Model
We want to find the smallest number of coins needed to make a certain amount using given coin values. We try all possibilities and remember the best results to avoid repeating work.
Analogy: Imagine you have different sized jars of candies and you want to fill a bag with exactly a certain number of candies using the fewest jars possible. You try different jars and keep track of the best way to fill the bag for smaller amounts first.
Amount: 0 1 2 3 4 5 Coins: [1, 2, 5] DP: [0, ?, ?, ?, ?, ?] ↑ Start with 0 amount needing 0 coins.
