RK DSA Studio

Greedy algorithms

A greedy algorithm commits to a locally preferred choice. Correctness requires a proof that the choice preserves an optimal solution.

Remember: A local choice needs a global argument.

Example: Choosing the earliest-finishing compatible interval maximizes the number selected.

The interactive workspace loads here when JavaScript is available. You can still browse the learning notes and links above without it.