created greedy.c