Add solution of greedy algorithm.