Question: We saw that BETTERCHANGE is an incorrect algorithm for the set of denominations ( 2 5 , 2 0 , 1 0 , 5 ,

We saw that BETTERCHANGE is an incorrect algorithm for the set of denominations (25,20,
10,5,1)(section 2.4). Add a new denomination to this set such that BETTERCHANGE will
return the correct change combination for any value of M. Give an example or explain your answer.
BONUS (2 marks): There are two possible answers to this question. If you provide both possible
answers along with their explanations you may earn 2 bonus marks.

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!