Stop memorizing solutions. Learn the patterns and frameworks that let you derive any DP recurrence from scratch — with interactive visualizations, step-by-step formula derivation, and live code in C++ and Go.
Learn DP by mastering patterns, not memorizing solutions. Build transferable intuition that works on any problem.
Watch DP tables fill cell by cell with animated dependency arrows, formula breakdowns, and adjustable inputs.
A repeatable method for deriving any DP recurrence: define, decide, recur, base, fill. Never stare at a blank page again.
Every problem includes complete, runnable code in C++ and Go — brute force through space-optimized.
From Fibonacci to Digit DP and optimization techniques. Each chapter builds on the last.
Mark chapters complete, review with spaced repetition, and see your progress at a glance.
From fundamentals to expert-level optimizations. Each chapter has interactive visualizations, code examples, and practice exercises.
What DP actually is, overlapping subproblems, optimal substructure, top-down vs bottom-up.
A repeatable 5-step method for deriving DP recurrences from any problem statement.
Linear sequence problems: House Robber, LIS, Kadane's algorithm, Coin Change.
Grid paths, two-sequence problems (LCS, Edit Distance), and the Knapsack family.
Problems over ranges [i,j]: Matrix Chain Multiplication, Burst Balloons, Palindrome Partitioning.
DP on tree structures: max path sum, diameter, House Robber III, re-rooting.
Subset state DP for small n: Traveling Salesman, assignment problems.
Count numbers with digit properties in a range. Process digit-by-digit with tight/free constraint.
Monotone queue, divide & conquer, Knuth's optimization, convex hull trick.
20 problem statements — classify the pattern, define subproblems, write recurrences, then check your answers.