The greedy algorithm is something like this?