M
Explanation by: Mr. Dubey
using the greedy algorithm, three coins {4,1,1} will be selected to make a sum of 6. but, the optimal answer is two coins {3,3}. similarly, four coins {4,4,1,1} will be selected to make a sum of 10. but, the optimal answer is three coins {4,3,3}. also, five coins {4,4,4,1,1} will be selected to make a sum of 14. but, the optimal answer is four coins {4,4,3,3}. for a sum of 100, twenty-five coins {all 4’s} will be selected and the optimal answer is also twenty-five coins {all 4’s}.
You must be Logged in to update hint/solution
Related MCQs
Q. If every non-key attribute is functionally dependent on the primary key, the relation will be in
Q. -------------- The functional independence of program componets.
Q. A base-band signal can be up-converted using
Q. Frame relay has error detection at the ______
Q. Which of the following adders can add three or more numbers at a time ?
Discusssion
Login to discuss.