Started work on greedy algorithm