added pset1-greedy.c