dynamic programming

Dynamic programming, or the "put shit in a table" technique, is an optimization for certain types of recurrence problems (specifically, those with overlapping subproblems). So the first thing I would say is think recursion, don't think dynamic programming at first. Once you solve the recurrence, dynamic programming is just an extra step at the end.

To solve recurrences, I like to pretend that I have an oracle that will tell me the answer to every question except for the one I want to know. When thinking about it like that, I find that the recurrence becomes clear much more quickly.

posted @ 2014-08-26 10:45  zmiao  阅读(130)  评论(0编辑  收藏  举报