VX(Li): Add the initial implementation for the greedy algorithm.