Question: Recall the coin change problem - using a set of denomination, we try to use greedy to pay a change amount using a minimum number

Recall the coin change problem - using a set of denomination, we try to use greedy to pay a change amount using a minimum number of coins. We know from the lecture, some denominatios work, some do not. For example, greedy algorithm works for the set of denominations 100,25,10,5,1 cents. From the following options chose the correct one. (There is only one correct answer).
a. Greedy works for 100,4,3,1.
b. Greedy woorks for 100,25,10,1.
c. Greedy works for both denominations.
O d. Greedy does not work for any of the given denominations.

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 Programming Questions!