Question: In class we saw that the Greedy algorithm to find the smallest number of coins may not always deliver the optimal solution. For example, with
In class we saw that the Greedy algorithm to find the smallest number of coins may not always
deliver the optimal solution. For example, with just quarters, dimes, and cents you cannot use the
Greedy algorithm to find the optimal number of coins for cents.
Find another example of value smaller than cents, where these coins quarters dimes, cents
in which the Greedy algorithm does not deliver the optimal solution.
Show the result of the Greedy algorithm and the optimal solution to your example.
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
