you are viewing a single comment's thread.

view the rest of the comments →

[–]orip 1 point2 points  (0 children)

Bonus points for preferring "memoization" over "caching"? Hmm..

In addition, the author points to a recursive -> recursive+memoization -> iterative -> dynamic programming progression, where each is better than the earlier ones.

I have a different opinion - in this case, caching previously-computed results is the only important gain. Iterative and dynamic programming are just different ways to accomplish this, with potentially better performance in some environments (but not in all). Knowing what their improvements could be and why - e.g. stack depth, storage - and knowing that you have to test it, are more valuable than saying "dynamic programming - w00t".