結果 : distinguish between greedy algorithm and dynamic programming approach