Question: We studied coin change problem in class and found a greedy algorithm to solve it. That greedy approach works for special denominations and may not

We studied coin change problem in class and found a greedy algorithm to solve it. That greedy approach works for special denominations and may not work for some bizarre denominations. For example, consider making change for 30 given coins of denominations 1, 10, 20, 25. The greedy algorithm produces 25, 1, 1, 1, 1, 1 but the optimal solution is 20, 10. Design a DP solution to this problem. Show your work to to get full marks. (20 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!