Changing Money Using Dynamic Programming
Let’s use a dynamic programming approach to solve the Change Problem.
We'll cover the following...
To avoid the many recursive calls that are needed to compute MinNumCoins(money), we’ll use a dynamic programming strategy. Wouldn’t it be nice to know all the values of MinNumCoins(money − coin) by the time we compute MinNumCoins(money)? Instead of the time-consuming calls to RecursiveChange(money − coin, Coins), we could ...