Skip to content

Glossary: Coding Interviews in Java

Dynamic programming (DP)

Also written: DP, dynamic programming

Solving each overlapping subproblem once and saving the answer, either with a memo in recursion (top-down) or with a table (bottom-up). It can find, for example, the fewest bags needed to make up a wholesale order.

Where the book teaches it

Related terms

Overlapping subproblemsMemoTop-downBottom-upSubproblem