0% completed
Course Overview
On This Page
What is a coding pattern?
What this course contains
How a pattern chapter is built
Where to test yourself
What is a coding pattern?
A coding pattern is a reusable technique that solves a whole family of problems. It is not one answer to memorize. It is a way to arrange the data, a way to move through it, and a way to reason about the cost.
Here is what that means in practice.
Take this question: given a sorted array, find two numbers that add up to a target. Now take a second question: given a sorted array, remove the duplicates in place. The two sound unrelated. They ask for different outputs, and most problem lists file them far apart.
Both are solved the same way. You place one index at the start of the array and another index further along. Then you move the two indexes toward each other, deciding each step from what you see. That technique is the Two Pointers pattern.
Once you know it, you have not learned two answers. You have learned the one technique that solves both, and about twenty more problems besides.
That is the whole idea of this course. You learn the pattern, and the pattern unlocks the problems.
Note: these are patterns in coding questions. They are not software design patterns like Singleton or Observer. This course does not cover those.
What this course contains
This course teaches 42 coding patterns.
- The first 31 are the core patterns. They cover most of what a coding interview asks. Two Pointers, Sliding Window, Merge Intervals, tree and graph search, and the Dynamic Programming families are all here.
- The last 11 are advanced patterns. They appear less often, but they show up in harder rounds. This group includes Segment Tree, Binary Indexed Tree, Meet in the Middle, MO's Algorithm, and Articulation Points and Bridges.
Across these patterns there are more than 300 problems. Each problem gets its own lesson with a statement, examples, constraints, and a code editor. The worked solution is always the lesson immediately after it.
Every solution is written in Java, Python, C++, JavaScript, C#, and Go.
How a pattern chapter is built
Every pattern chapter follows the same shape.
- An introduction lesson explains the pattern and the signals that tell you to use it.
- The first problem shows the pattern in full detail. Read this one closely, because the rest of the chapter builds on it.
- The next problems change the constraints. Each one shows how the pattern adapts when the question shifts.
- The Problem Challenges at the end are practice. Try these on your own before you open the solution.
The patterns use a range of techniques underneath: Breadth-First Search, Depth-First Search, Dynamic Programming, Backtracking, Recursion, Greedy algorithms, and Divide and Conquer. Each one is introduced at the point where you first need it.
Where to test yourself
Three chapters near the end are called Test Your Knowledge, split into Easy, Medium, and Hard. They hold 34 problems, and none of them tell you which pattern applies.
That is the closest rehearsal to a real interview, because no interviewer will say "this is a Sliding Window question". Save these chapters for after you have worked through the patterns.
The Revision chapter holds a cheat sheet covering every pattern in one place. It is the right thing to read the day before an interview.
The next lesson explains how to pace yourself, when to look at a solution, and whether the chapter order matters.
After that, let's start with some warmup questions, and then move on to the first pattern, Two Pointers.
Alex Wells
· 4 years ago
More than 16 now!
Tyler Hazleton
· 2 years ago
Have you tried figuring out a recommended course pace? Obviously if you have like 4 weeks before you start interviewing you just have to grind and practice a lot, but what if you currently have a full time job and you're thinking to target some of the FAANGS 6 months from now? Would you take a breadth first approach and go through all the patterns then come back through the practice problems? Would you recommend a 1 at a time approach and really try to dig into each pattern?
Ahava Morse
· 2 years ago
Is the order of the patterns intentional? Would it be recommended to go to certain ones you feel you need more practice on or are trying to learn? Or do the topics build on each other and/or increase in difficulty so they should be done in order?
Gaurav Thakur
· 9 months ago
This needs correction.
One line mentions 33 patterns: "This course categorizes coding interview problems into a set of 33 patterns"
Another line mentions 28 patterns: "Overall, the course has more than 250 problems mapped to 28 patterns.
"
On This Page
What is a coding pattern?
What this course contains
How a pattern chapter is built
Where to test yourself