• + 1 comment

    How many steps would it take to decrease 900 chocolates down to 0?

    This is the step where the problem authors expect you to use Dynamic Programming. It looks to me like @namdx1987 is suggesting a greedy approach instead, which works perfectly for the "decrease" amounts of 1,2,5.

    But there are other decrease amounts for which a greedy approach would not work (such as 1,3,4). So just a slight tweak to this problem would make Dynamic Programming necessary.

    Since it's filed under "Dynamic Programming", the problem might be better off with a slight change to the "decrease" amounts. Regardless, I still really like this problem, and I think it's a neat twist off the classic change-making problem.