Dynamic programming solves a problem by solving smaller subproblems and saving their results so you don’t recompute them. Use it when subproblems overlap and the best solution can be built from best sub‑solutions (memoization/top‑down or a bottom‑up table).