Dynamic Programming

Dynamic Programming is a technique for optimizing the time complexity of algorithms, mainly for recursive algorithms. It is peformed by breaking a problem down into simpler subproblems and storing the results of those subproblems so we do not have to re-compute them when needed later on.

There are two main concepts within dynamic programming: memoization and tabulation. These concepts will be explained through a series of examples shown below.

Memoization