Add unit tests for GreedyAlg