It's used to solve optimization problem.
- Break down the complex problem into simple subproblems.
- Find optimal solution of these subproblems.
- Save the results of subproblems (Memoization)
- Reuse them so that same subproblem is not calculated more than once.
- Finally calculate the result of complex problem.
Applicable to problems that are having properties of overlapping subproblems & optimal substructure.
- Define problem variables and decide the states. What will change after each decision?
- Define table structure and size.
- The table structure is defined by the number of problem variables.
- The size of this table is defined by the total number of different subproblems.
- Table Initialization
- Iterative structure to fill the table.
- Termination and returning final solution.