Grokking Dynamic Programming Patterns for Coding Interviews
A dynamic programming course organised around five patterns: 0/1 knapsack, unbounded knapsack, Fibonacci numbers, palindromic subsequence and longest common substring. Each of its 35 problems is solved three ways, as plain recursion, top-down with memoization, and bottom-up tabulation. It suits candidates who can handle most interview topics but stall on DP because they cannot find the recurrence.
4.4/5 (4,401 ratings)
Course page · Sept 2026
13,204
Course page · Sept 2026
73 in 7 chapters
Course page · Sept 2026
70 hours (stated)
Course page · Sept 2026
35 across 5 patterns
Course page · Sept 2026
$78 one-time (lifetime)
Course page · Sept 2026
Course
Interview Prep
Design Gurus
3 to 5 weeks
Advanced
Subscription
Why a pattern approach to DP
Dynamic programming is where most interview preparation stalls. The standard advice ("find the recurrence and memoise it") is true but unhelpful, because finding the recurrence is the whole difficulty. People read ten solutions, understand each one, and still cannot start the eleventh.
This course groups problems into families. Once you have worked through 0/1 knapsack properly, subset sum, equal subset sum partition, minimum subset sum difference, count of subset sum and target sum all use the same recurrence with a different question at the end.
What it covers
The course page lists 7 chapters, 73 lessons, 142 playgrounds and a stated 70 hours of study time, with the level marked advanced (September 2026). The five patterns:
- 0/1 knapsack: equal subset sum partition, subset sum, minimum subset sum difference, count of subset sum, target sum.
- Unbounded knapsack: rod cutting, coin change, minimum coin change, maximum ribbon cut.
- Fibonacci numbers: staircase, number factors, minimum jumps to reach the end, minimum jumps with fee, house thief.
- Palindromic subsequence: longest palindromic subsequence and substring, count of palindromic substrings, minimum deletions to make a palindrome, palindromic partitioning.
- Longest common substring: longest common subsequence, edit distance, longest increasing subsequence and several variations, shortest common supersequence, subsequence pattern matching, strings interleaving and more.
Every problem is solved as brute-force recursion first, then memoized, then tabulated, so you can watch one form turn into the next. Solutions are in Python, Java, C++, JavaScript, Go and C#.
Is it worth it?
As of September 2026 the course page lists a one-time price of $78 for lifetime access, and it is included in the provider's all-courses subscription. It shows a 4.4 rating from about 4,400 ratings and roughly 13,200 learners.
What you get is a consistent three-step treatment of every problem, grouped by family, so the recurrence for a new question starts to look familiar. If DP is the topic costing you interviews, that structure is the useful part.
How long it really takes
Seventy hours is generous but not unrealistic if you do the work properly. Plan four to six weeks at an hour or two a day. Knapsack and longest common substring are the heaviest chapters.
How to use it well
- Write the brute-force recursion by hand first, every time, before looking at the memoized version. Adding a cache to a correct recursion is mechanical; the recursion is the real skill.
- Draw the table for the bottom-up version and work out the fill order before coding it.
- After each pattern, close the solutions and re-solve two problems from it from scratch, a few days later.
- Revisit knapsack after finishing the course. It becomes much clearer the second time.
Before you start
You should be comfortable with recursion. Grokking the Art of Recursion for Coding Interviews is the natural lead-in if you want to build that first.
Best for: candidates who have most patterns down and keep losing interviews to one DP question.
Ready to start?
Opens on Design Gurus in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.