What is dynamic programming?
Solve problems by breaking into overlapping subproblems and combining optimal solutions. Requires optimal substructure and overlapping subproblems.
opt(i) = combine(opt(subproblems))
DSA · 9 sections
Memoization, tabulation, and the patterns behind every DP interview problem.
Solve problems by breaking into overlapping subproblems and combining optimal solutions. Requires optimal substructure and overlapping subproblems.
opt(i) = combine(opt(subproblems))
An optimal solution can be built from optimal solutions of subproblems. If subproblems overlap, DP beats divide-and-conquer.
opt(i) = f(opt(sub))
Same subproblems recur exponentially in naive recursion. DP computes each once and reuses.
Fib: F(n)=F(n-1)+F(n-2)
101 more cards in this sheet
Unlock the DSA & Data Structures bundle — ₹399
One-time payment. Unlocks this sheet and 8 other sheets in the bundle, plus a typeset PDF of each.
Unlock the bundle See all bundles
Or get all 76 sheets for ₹999 — one payment, every future sheet included.
What's new and the interview questions people are actually getting asked. No spam.