Question: Write pseudocode for the greedy algorithm version of the change making problem for a set of coin denominations D - [do, di, ., dn] where

 Write pseudocode for the greedy algorithm version of the change making

Write pseudocode for the greedy algorithm version of the change making problem for a set of coin denominations D - [do, di, ., dn] where do > di>>dn. You can assume that a greedy approach will work for D. (For example, coin denominations in the United States would be D [.25,.10,.05,.01].) 1. The pseudo code should return a list of coins chosen by the algorithm, eg. [0.25, 0.25, 025, 0.05] when returning 080 using a Canadian set of coins

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!