Question: Could you explain this question? The correct answer is a. Why can't we use a greedy approach here? We consider the making change problem where

Could you explain this question? The correct answer is a. Why can't we use a greedy approach here?

Could you explain this question? The correct answer is a. Why can't

We consider the making change problem where the aim is to make a given amount with a minimal number of coins; for every coin value we have an unlimited number of coins available. We have coins with values 1,3,7,8 and we aim to make the amount 14. For this example, a greedy choice for a coin of largest value is not correct. a greedy choice for a coin of lowest value is correct. a greedy choice for a coin of largest value is correct

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!