guess the next step: Greedy change-making
Before each step plays, guess what it does. The page then shows the step as the run takes it and says why, the same sentence the watch page says there.
Step 7 of 16
Question 7 of 12
Step 7 of 16
Step 8 of 16
Step 9 of 16
Step 12 of 16
Step 13 of 16
Step 14 of 16
Step 15 of 16
Step 16 of 16
Question 7 of 12
Question 7 of 12
Right.
You guessed: A coin of 1 fits, so take it.
What the run did:
A coin of 1 fits in the 2 left, so take it. 1 left to pay.
Question 7 of 12
Not this time.
You guessed: A coin of 1 does not fit, so go on to the next smaller coin.
What the run did:
A coin of 1 fits in the 2 left, so take it. 1 left to pay.
Question 8 of 12
Question 8 of 12
Right.
You guessed: A coin of 1 fits, so take it.
What the run did:
A coin of 1 fits in the 1 left, so take it. 0 left to pay.
Question 8 of 12
Not this time.
You guessed: A coin of 1 does not fit, so go on to the next smaller coin.
What the run did:
A coin of 1 fits in the 1 left, so take it. 0 left to pay.
Question 9 of 12
Question 9 of 12
Right.
You guessed: 0 of 10 and 1 of 7 take fewer coins than any way before, so keep it.
What the run did:
0 of 10 and 1 of 7 leave 8 to pay in 1s: 9 coins in all, fewer than any way before. Keep it.
Question 9 of 12
Not this time.
You guessed: 0 of 10 and 1 of 7 take no fewer coins than the best before.
What the run did:
0 of 10 and 1 of 7 leave 8 to pay in 1s: 9 coins in all, fewer than any way before. Keep it.
Question 10 of 12
Question 10 of 12
Right.
You guessed: 0 of 10 and 2 of 7 take fewer coins than any way before, so keep it.
What the run did:
0 of 10 and 2 of 7 leave 1 to pay in 1s: 3 coins in all, fewer than any way before. Keep it.
Question 10 of 12
Not this time.
You guessed: 0 of 10 and 2 of 7 take no fewer coins than the best before.
What the run did:
0 of 10 and 2 of 7 leave 1 to pay in 1s: 3 coins in all, fewer than any way before. Keep it.
Question 11 of 12
Question 11 of 12
Not this time.
You guessed: 1 of 10 and 0 of 7 take fewer coins than any way before, so keep it.
What the run did:
1 of 10 and 0 of 7 leave 5 to pay in 1s: 6 coins in all, no fewer than the 3 found before.
Question 11 of 12
Right.
You guessed: 1 of 10 and 0 of 7 take no fewer coins than the best before.
What the run did:
1 of 10 and 0 of 7 leave 5 to pay in 1s: 6 coins in all, no fewer than the 3 found before.
Question 12 of 12
Question 12 of 12
Not this time.
You guessed: No way takes fewer coins than greedy did.
What the run did:
Done: greedy pays 6 coins, 10, 1, 1, 1, 1 and 1, but 3 are enough. Taking the biggest coin first is not always the fewest.
That is every question on this run: 0 of 12 right.
Question 12 of 12
Right.
You guessed: Some way takes fewer coins than greedy did.
What the run did:
Done: greedy pays 6 coins, 10, 1, 1, 1, 1 and 1, but 3 are enough. Taking the biggest coin first is not always the fewest.
That is every question on this run: 1 of 12 right.