Glossary: Algorithms Beyond the Basics in Java
greedy algorithm
Also written: greedy
An approach that takes the best-looking choice at each step and never goes back. It is fast, but only correct when something like a swap argument shows the choice is safe; Kettle & Crane's gift cards break it.