Dynamic programming (DP) solves optimization problems by identifying overlapping subproblems and optimal substructure. Top-down (memoization) adds caching to recursion. Bottom-up (tabulation) builds solutions iteratively. Classic patterns include 0/1 knapsack, longest common subsequence, coin change, and edit distance.
The 5-Mode Loop
5 of 5 modes available
Read · See · Animate · Test · Build
Before this, understand: recursion