Glossary: Algorithms Beyond the Basics in Go
Greedy algorithm
Also written: greedy
Takes the best-looking choice at each step and never undoes it. It is fast but only right when something, like a swap argument, shows the choice is safe.
Glossary: Algorithms Beyond the Basics in Go
Also written: greedy
Takes the best-looking choice at each step and never undoes it. It is fast but only right when something, like a swap argument, shows the choice is safe.