I understand the theory of this section I think, but I'm not sure how well that translates to being able to use it in practice. I can follow the example code in the book, but I don't think I could write it yet.
The coin problem is a little funny to read because I do it so differently in my head. You just use as many of the biggest coins as you can and then repeat for the next size down until you get to pennies. It works with our money system, but it baffles me it doesn't work for some others. And both ways to find the optimal number of coins, while good, seem overkill. (They aren't, because they would work with any money system. They just seem like they are because all of my experience says they are.)
The coin problem is a little funny to read because I do it so differently in my head. You just use as many of the biggest coins as you can and then repeat for the next size down until you get to pennies. It works with our money system, but it baffles me it doesn't work for some others. And both ways to find the optimal number of coins, while good, seem overkill. (They aren't, because they would work with any money system. They just seem like they are because all of my experience says they are.)
Comments
Post a Comment