The structure of the Greedy algorithm.