A main for the GreedyAlgorithm.