Skip to content

Greedy change-making

planning ahead

Level 2 of 3

Also called Biggest coin first and The cashier's algorithm.

Pays an amount by taking the biggest coin that fits, again and again. It is quick, and on some coins it gives the fewest, but not on all. So after it pays, every way of paying is tried, to see whether fewer coins would do.

the coins each way takes, by how many of each bigger coin

coins held against what is left
0
ways tried
0

step 1 of 1

Examples

2 or 3 different coin values from 1 to 15, one of them 1, separated by commas, then a semicolon and the amount to pay, from 1 to 15, for example 10, 7, 1; 15.