Algorithms, Dynamic Programming, Data Structures, Computer Science, Leetcode.
solutions. At the beginning, we create a lookup table. Whenever we need the solution to a subproblem, we first look into the lookup table. If the pre-computed value is there, we return that value. Otherwise, we calculate the value and put the result in the lookup table so that it can be reused