Question: Explain your reasoning and show calculations / steps , please. This task is known as the coin change problem. Given the currency denominations for Norwegian
Explain your reasoning and show calculationssteps please. This task is known as the coin change problem.
Given the currency denominations for Norwegian krone coins we devise a greedy
algorithm to give change while using the fewest number of coins possible.
When returning an amount we will give a coin of the largest value possible that does not take
us over the amount we have left to pay, and repeat so until we reach
a Is this algorithm optimal?
b Suppose we introduce a kroner coin. Is the algorithm still optimal?
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
