Skip to content

Greedy

Take the best local move and see exactly when that is enough.

Start the module

1. What Makes Greedy Work · 5 min

0 of 5 lessons · 0% complete

Start module

Greedy visualizer

Every lesson in this module opens with an animation you can step through. This is the first one — What Makes Greedy Work: Take the best move now — but only when it can never block a better answer.

What Makes Greedy Work

Step 1 of 9

Greedy has one rule: take the biggest coin that still fits, and never reconsider.

Lessons
5
Minutes
27
Problems
13
Concepts
6

Quiz yourself: 3 questions from this module

1 / 3

What does a greedy algorithm never do?