Memoization is a technique used to optimize an exponential recursive function into a fast polynomial one. Let’s take the classic problem of Fibonacci numbers. The recursive function would look like this: In order to obtain an time complexity, we want to transform it using memoization. Because is called multiple times, we want to store the […]
Continue Reading