AlgoScope

Greedy

ParadigmintermediateParadigms

Take the locally best choice and never look back; correct only when an exchange argument holds.

Decision · step 2 of 4Greedy Choice: Coins where greedy fails
4✓03112coin

6 left. 4 fits, so take it once: 6 - 4 = 2.

Open in the player →or start at step 2

What you will see

CANDIDATE -> LOCAL DECISION -> CONSEQUENCE; also a counterexample where greedy fails (coin change with 1, 3, 4).

How greedy choice works →

Cost

SpaceO(1)

How you work with it here

play it through, step one change at a time, compare two runs.

Screen readers: Each paradigm lesson is narrated as the characteristic loop it performs; the comparison view is available as a table.

Reduced motion: Side-by-side panes update in place.

Before this

Taught by the same lesson

Greedy Choice covers these too, in the same run.