Add greedy algorithm.