Naive Greedy Algorithm working