Question: (a) (5 points) Recall the problem of making change for n cents using the least number of coins in the previous homework. You derived a

(a) (5 points) Recall the problem of making change for n cents using the least number of coins in the previous homework. You derived a greedy algorithm when the coin denominations were 1, 5, 10, 25, and proved that the greedy algorithm doesn't work for arbitrary denominations. Now suppose the coins are available in k denominations di, d2,.., dk. Design a dynamic programming algorithm for making change of n cents using the least number of coins
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
