All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Greedy algorithm?

Definition 18.2 High School Computer Science · Chapter 18 — Greedy Algorithms

A greedy algorithm builds a solution one piece at a time, each time taking the piece that looks best at that moment, by a fixed rule, and never going back on a choice.

Read in context →
Definition 22.1 University Computer Science — Year 1 · Chapter 22 — Greedy Algorithms and Their Proofs

A greedy algorithm builds a solution by a sequence of choices, each made by a fixed rule that looks only at the current partial solution, and never undone.

Read in context →