Dynamic Programming
4. Patterns
4. PATTERNS
Dynamic Programming
The pattern that decides senior interviews: identifying state, writing the recurrence, then removing the recursion overhead entirely in code.
7 resources 0 labs
The recursion mental model with call stacks drawn out, the prerequisite that most DP struggles trace back to.
VIDEOENFREE 15 min4.9 (49)
The formal route from recursion to memoisation to tabulation, with the state-design questions that decide everything in an interview.
TEXTENFREE 35 min4.8 (75)
A repeatable procedure for going from problem statement to a recurrence, demonstrated on several problems that look completely unrelated.
VIDEOENFREE 21 min4.7 (44)
An animated course that shows the table filling in, which is the part written explanations consistently fail to convey.
VIDEOENFREE 102 min4.6 (49)
The backtracking template applied to subsets and permutations, which covers most of the problems in this interview family.
VIDEOENFREE 13 min4.4 (57)
The knapsack family, including the one-dimensional optimisation that turns an O(nW) table into a rolling array of two rows.
TEXTENFREE 30 min4.1 (67)
Longest increasing subsequence in O(n log n), the patience-sorting trick that generalises to many other sequence problems in practice.
TEXTENFREE 30 min4.1 (41)