Adding greedy problem solution