Skip to content

Glossary: Coding Interviews in Go

Dynamic programming (DP)

Also written: dynamic programming, DP, pattern 15

Solving each overlapping subproblem once and saving the answer, with a memo (top-down) or a table (bottom-up). It makes slow recursion, such as the fewest-bags problem, fast.

Where the book teaches it

Related terms

Overlapping subproblemsMemoTop-downBottom-upSubproblem