Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Course · Interview PrepSubscription

Grokking the Coding Interview: Patterns for Coding Questions

A pattern-based coding interview course covering 31 common and 11 advanced patterns such as sliding window, two pointers, merge intervals, cyclic sort, top K elements, topological sort, union find and segment trees, with more than 300 problems solved in six languages. Instead of memorising solutions, you learn to map a new question to a known pattern. It suits anyone with working data structures knowledge who freezes on unfamiliar questions.

Get access
Rating

4.6/5 (64,748 ratings)

Course page · Sept 2026

Learners

194,243

Course page · Sept 2026

Lessons

671 in 49 chapters

Course page · Sept 2026

Study time

90 hours (stated)

Course page · Sept 2026

Patterns

31 common + 11 advanced

Course page · Sept 2026

Price

$197 one-time (lifetime)

Course page · Sept 2026

Format

Course

Topic

Interview Prep

Provider

Design Gurus

Time needed

6 to 8 weeks

Level

Intermediate

Access

Subscription

The idea behind it

Most people prepare for coding interviews by grinding a long list and hoping the right problem appears. That scales badly because the list never ends. This course inverts the approach: it groups questions into recurring patterns, then works each pattern until you recognise its shape. The course page puts it as "the ability to map a new problem to an already known problem". Once you can name the pattern in the first couple of minutes, the implementation is usually something you already know how to write.

It is one of the earliest and best-known courses built this way, and many free "coding patterns" lists use similar pattern names.

What it covers

As of September 2026 the course page lists 49 chapters, 671 lessons, 721 playgrounds and about 90 hours of study time, marked intermediate level. It covers:

  • Warm-up chapter, then the high-yield array patterns: two pointers, fast and slow pointers, sliding window, merge intervals, cyclic sort, in-place reversal of a linked list.
  • Stacks, monotonic stacks and hash maps.
  • Trees and graphs: tree level order traversal (BFS), tree DFS, graphs, islands (matrix traversal), topological sort and union find.
  • Heaps and search: two heaps, top K elements, K-way merge, modified binary search, bitwise XOR.
  • Subsets, backtracking, greedy algorithms, tries, ordered sets, prefix sums and a multithreading chapter.
  • Dynamic programming split into families: 0/1 knapsack, Fibonacci numbers and palindromic subsequences.
  • Advanced patterns most courses leave out, including segment trees, binary indexed trees, meet in the middle, and articulation points and bridges.
  • Test Your Knowledge: 34 problems across easy, medium and hard with no hint about which pattern applies.

Every problem has a statement, an in-browser editor to try it first, and a worked solution with time and space complexity. 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 $197 for lifetime access, and it is included in the provider's all-courses subscription, which is often better value if you also want system design material. It shows a 4.6 rating from about 64,700 ratings and roughly 194,000 learners.

The course keeps one consistent explanation style throughout, with a pattern introduction before each set of problems and code in six languages next to every solution, which makes it easy to revisit a pattern quickly before an interview.

How long it really takes

The full course is large. For a first interview, focus on the first 20 or so patterns, which takes six to eight weeks at one to two hours a day. The advanced chapters (segment trees, binary indexed trees and similar) are there for harder loops once the core is solid.

Before you start

You should know arrays, hash maps, linked lists, stacks, queues, heaps and trees, and be comfortable with recursion. Grokking Data Structures & Algorithms for Coding Interviews covers that ground if you need it first.

How to use it well

  • Do not read it end to end. Take one pattern at a time, solve the problems without looking, then reread the introduction and see what you missed.
  • Mix in unlabelled problems. Knowing the chapter title gives the answer away. Use the Test Your Knowledge set, and revisit older chapters in shuffled order, to practise recognition.
  • Revisit old patterns every week or two so they stay fresh.

Best for: anyone with working data structures knowledge who keeps freezing on unfamiliar questions.

interview prepalgorithmsdata structures

Ready to start?

Opens on Design Gurus in a new tab.

Get access
Link broken or out of date?

Report a problem

With "Grokking the Coding Interview: Patterns for Coding Questions". Only Tauseef reads this.

Work with me

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.