greedy algorithm
Chapter 19