Python Tutorial on Recursion, the Fibonacci Sequence and Memoization

Socratica explores recursion by writing a function to generate the terms of the Fibonacci sequence.

We will use a technique called “memoization” to make the function fast. We’ll first implement our own caching, but then we will use Python’s builtin memoization tool: the lru_cache decorator.

Frank

#DataScientist, #DataEngineer, Blogger, Vlogger, Podcaster at http://DataDriven.tv . Back @Microsoft to help customers leverage #AI Opinions mine. #武當派 fan. I blog to help you become a better data scientist/ML engineer Opinions are mine. All mine.