I have to review greedy algorithm and dp