This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Transforming the vanilla recursive fib into the iterative DP version | |
| # through a series of mechanical steps. | |
| # | |
| # For more on converting recursive algorithms into iterative ones, see: | |
| # http://blog.moertel.com/posts/2013-05-11-recursive-to-iterative.html | |
| # original function | |
| def fib(n): |