Dynamic programming (DP)
Also written: DP, dynamic programming
Solving each overlapping subproblem once and saving the answer, using a memo dict (top-down) or a table (bottom-up). It speeds up recursion that repeats the same smaller questions.
Also written: DP, dynamic programming
Solving each overlapping subproblem once and saving the answer, using a memo dict (top-down) or a table (bottom-up). It speeds up recursion that repeats the same smaller questions.