Glossary: Algorithms Beyond the Basics in JavaScript
Dynamic programming
Also written: DP
A way to solve a problem from the answers to smaller problems that repeat, saving each answer instead of recomputing it. It needs overlapping subproblems and optimal substructure, and can be done top-down or bottom-up.
Where the book teaches it
Related terms
MemoizationTabulationOverlapping subproblemsOptimal substructure