Question: consider a greedy algorithm that selects stamps by first choosing as many of the 10-cent stamps as possible, then as many of 8 cent stamps
consider a greedy algorithm that selects stamps by first choosing as many of the 10-cent stamps as possible, then as many of 8 cent stamps as possible, then as many 1 cent stamps as possible. does this greedy algorithm always produce the fewest number of stamps needed for each possible amount of postage? why or why not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
