Greedy algorithm
Applies to: general
A greedy algorithm builds a solution by always taking the locally best choice, never reconsidering. It is fast and simple but only correct when local optimum leads to global optimum, as in interval scheduling, Huffman coding, and minimum spanning trees.
activity selection: keep picking the next event that finishes earliest
See also: dynamic-programming, sorting