How to tell which dynamic programming pattern a problem wants
7 min read A reference to the main dynamic programming families, what the dp array means in each, and the canonical problems that drill each one. Read article
7 min read A reference to the main dynamic programming families, what the dp array means in each, and the canonical problems that drill each one. Read article
6 min read A walkthrough of LeetCode 72, from the recursive prefix idea to the 2D table, its O(n)-space version, and the follow-ups interviewers ask. Read article
7 min read House Robber reduces to two running numbers and a two-state machine, and that same shape solves the circular, tree, and stock-cooldown follow-ups. Read article
6 min read Kadane’s algorithm finds the largest contiguous subarray sum in a single pass, and the interview really lives in the follow-ups: all-negative inputs, returning indices, and the product and circular variants. Read article
7 min read The seven recurrences that cover most interview dynamic programming, with the tells that let you recognize each one before you write code. Read article
6 min read Word Break looks like a string problem but rewards you for caching subproblems by start index, from the memoized recursion to the trie follow-up. Read article
5 min read Greedy returns the wrong coin count the moment denominations aren’t standard, so Coin Change needs a short dynamic-programming table instead. Read article
6 min read The trapped-water problem has three standard solutions, and the gap between them is what an interviewer is actually grading. Read article
3 min read The 0/1 Knapsack problem is one of the most important DP patterns. Unlike coin change (unbounded knapsack), each item can Read article
3 min read Longest Common Subsequence (LCS) is a fundamental string DP problem that appears in interviews at Google, Microsoft, and Amazon — Read article
3 min read Edit Distance (Levenshtein Distance) is a classic string DP problem that appears in interviews at Google, Microsoft, and Dropbox. It’s Read article
2 min read Word Break (LeetCode 139) is a string DP problem that tests whether you can partition a string using a given Read article
2 min read Coin Change (LeetCode 322) is the canonical dynamic programming problem. It tests your ability to identify optimal substructure, choose between Read article
What's missing, wrong, or worth adding? One line helps.
Sent — thank you. We read every one.