Memoization

Learn how to tackle the inefficiency of repeated function calls introduced by recursion.

We'll cover the following

Use a dictionary

The basic problem in the Fibonacci example is that we are calling fibonacci multiple times, with the same argument. So, each time we are calculating the same value all over again.

svg viewer

Get hands-on with 1200+ tech skills courses.