Automatic Memoization in Python
Memoization (a key concept in dynamic programming) is a fancy word that basically means storing the results of computation and never recomputing. Instead, you simply look up the already computed value. Any pure function can be memoized. Memoization can have a dramatic affect on the runtime of algorithms which use the results of computation multiple…