Vidyalelo
Data Structure · Q586

Miscellaneous on Data Structures

Programming · Data Structure · question 586

Q586

Suppose you have coins of denominations 1, 3 and 4. You use a greedy algorithm, in which you choose the largest denomination coin which is not greater than the remaining sum. For which of the following sums, will the algorithm produce an optimal answer?

A.
100
Answer
B.
10
C.
6
D.
14

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board