CodingPartner

← All articles

A LeetCode Study Plan Built Around Patterns: Fewer Problems, More You Can Solve

You've solved a lot of LeetCode problems. Then an interviewer hands you one you haven't seen, and you freeze. A bigger solved count won't fix that, and you won't run out of problems either: LeetCode's public problem list has over 4,000 of them. So the real question is which ones to solve, and in what order.

Here's one way to answer it. Start with fundamentals that carry over to many other problems. Then build on them one small change at a time, and let each change test how well you know the basics and how well you can use them. At CodingPartner, we built three free study plans on this idea. Every step comes with real LeetCode problems you can open today.

What it takes to solve a problem you haven't seen

When practice carries over to a new problem, three things happen:

  1. You recognize the pattern. The statement never says "sliding window" or "binary search," but you can see that one of them fits.
  2. You have the pattern's template. You know the solution skeleton well enough to write it without looking it up.
  3. You know what changes. Every problem bends the template somewhere: the condition that keeps a window valid, the thing you binary-search over, the state a DP carries. You know which part to adjust and which part to leave alone.

Solving problems at random trains these three skills only by accident. Popular lists like Blind 75 (75 problems) and NeetCode 150 (150 problems) help by cutting the pile down. But they group problems by data structure or topic, like Array or Tree.

That tells you where a problem lives. It doesn't tell you which problem teaches the skeleton, which one changes a single part of it, and which one tests whether you can spot the pattern without a hint.

The goal is fewer problems, each picked for the pattern it teaches, so your practice carries over to problems you haven't seen.

Template, variant, transfer check

For each pattern, we pick problems in three roles:

  • Template: the cleanest version of the pattern. You solve it to learn the skeleton.
  • Variant: changes exactly one thing about the template. You solve it to see what moves and what stays put.
  • Transfer check: the statement doesn't give the pattern away. You have to recognize it yourself.

Here's what that looks like for one pattern, hash lookup.

1 Two Sum is the template: for each number, look up its complement in a hash map. 49 Group Anagrams is a variant. The hash map is still the tool, but now you group words by a normalized key. 128 Longest Consecutive Sequence is the transfer check. Nothing in it says "hash map," and the trick is to start counting only at the beginning of a run.

Start with the fundamentals, then the patterns

Patterns are ways of using data structures, so the plans start one step earlier, with two layers.

Layer 1: data structure fundamentals. These problems test the operations of a data structure and nothing else: push, pop and peek on a stack; insert, delete and get at any position in a linked list. Every pattern later is built on these, so they come first. That's also why bracket matching and reversing a linked list aren't in this layer. They use a data structure to solve a problem, so they belong in layer 2.

Layer 2: data structures + algorithms. Here you already know the operations. The question is which structure or algorithm to reach for, and why. Some problems teach a classic use of a structure, like a monotonic stack finding the next warmer day in 739 Daily Temperatures. Others teach an algorithm pattern, grouped by the work a brute-force solution repeats and the pattern skips, like a sliding window reusing what it knows about the previous window in 3 Longest Substring Without Repeating Characters.

The rule for which layer a problem goes in is where people get stuck. If it's getting the operations right, it's layer 1. If it's seeing why and how to use the structure, it's layer 2.

Three plans: Core, Advanced, Ultra

The roles from earlier decide which plan a problem goes in. There are three plans and 124 problems in total, and no problem shows up in more than one. In the hash lookup example, 1 Two Sum is in Core, 49 Group Anagrams in Advanced, and 128 Longest Consecutive Sequence in Ultra.

Plan What's in it Problems Difficulty
CodingPartner Core All layer 1 fundamentals (28) + the templates (28) 56 28 Easy, 27 Medium, 1 Hard
CodingPartner Advanced The variants 38 4 Easy, 33 Medium, 1 Hard
CodingPartner Ultra The transfer checks 30 20 Medium, 10 Hard

Core is where you learn the operations and the skeletons, so it's mostly Easy and Medium. Advanced is almost all Medium. Ultra is the hardest, because the statement no longer tells you which pattern to use.

On Advanced and Ultra, each group links back to the Core problem it builds on. If 49 Group Anagrams stumps you, follow the link back to 1 Two Sum and review the skeleton first.

You don't have to start at the top of Core. If you already know a pattern well, skip its template and go straight to the variants.

Every problem was checked against LeetCode: the numbers and titles match, and none is premium-only.

How to use the plans

Each plan is a list of problems. Each row gives you the problem number, a title that links to the problem on LeetCode, the difficulty, and one line on what that problem trains.

Here's the workflow:

  1. Open the problem on LeetCode and solve it.
  2. Log it in one click with the free CodingPartner Chrome extension, or add it by hand.
  3. The plan's progress updates by itself.

Each problem shows a status, based on your own CodingPartner problem bank:

  • Gray, Not started.
  • Yellow, Attempted: you have logged at least one attempt.
  • Green, Mastered: your latest confidence rating is 5 out of 5.

The plans are public. Without signing in, you can read each plan's intro and its first group on the Study Plans page. Sign in to see the full list and your progress.

CodingPartner is free: Google sign-in, no credit card. Not sure where to begin? Start with the Core plan, or browse all three study plans.

Related: How many LeetCode problems should I do? · Solved 500 problems and still failing interviews? · Why you forget LeetCode solutions