AI Features

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(moneycoini_{i}) by the time we compute MinNumCoins(money)? Instead of the time-consuming calls to RecursiveChange(money − coini_{i}, Coins), we could ...