Mark As Completed Discussion

The Theory

Dynamic Programming is a method for solving a complex problem by breaking it down into a collection of simpler subproblems. These subproblems are solved just once and their solutions are stored using a memory-based data structure (via an array, hashmap, list, etc).

The solutions of a subproblem are typically stored and indexed in a specific way based on the values of its input parameters. This helps to facilitate its lookup.

What that means is that the next time the same subproblem occurs, instead of recomputing its solution, you simply just lookup the previously computed solution which saves computation time. This process of saving the solutions to the subproblems instead of recomputing them is called memoization.