STUDY GUIDE

The Study Guide

A structured path through 14 patterns and 3850 problems. Designed to build intuition from the ground up.

14
Patterns
3850
Problems
4–6
Weeks
1
Pattern first, problems second
Read the pattern page to build a mental model before attempting any problems. Understanding the "why" makes the "how" click faster.
2
Use the visualizations
Step through the interactive demos on every page. Visual memory is stickier than reading code — you'll recall the animation in an interview.
3
Don't memorize, recognize
The goal isn't to memorize solutions. It's to recognize which pattern fits a new problem. If you can name the pattern, the code follows.
Phase 1: Foundations
Core techniques that everything else builds on.
01
The simplest pattern and your gateway to pointer-based thinking. Start here.
Signal: Sorted array or linked list + find a pair/triplet meeting a condition.
02
Builds directly on two-pointer intuition. Same "shrink/expand" mindset, applied to subarrays.
Signal: Contiguous subarray/substring with a constraint (max length, sum, unique chars).
03
Quick wins that teach you to precompute. The "aha" moment comes fast.
Signal: Range sum queries, subarray sums equal to k, or cumulative frequency.
04
Essential O(log n) technique. You'll use it everywhere once you see the pattern.
Signal: Sorted or rotated array + searching for a boundary, position, or threshold.
05
Extends your pointer intuition to linked lists and cycle detection.
Signal: Linked list cycle, finding the middle node, or detecting a repeated element.
Phase 2: Core Patterns
The patterns that appear most often in interviews.
06
Linked list manipulation is an interview staple. Learn to re-wire pointers without extra space.
Signal: Reverse a linked list (or a portion of it) in place.
07
Deceptively powerful. Solves an entire class of "next greater/smaller element" problems.
Signal: Next greater element, histogram areas, or parenthesis validation.
08
Foundation for all tree and many graph problems. Master the four traversal orders.
Signal: Any tree problem — validate BST, find depth, serialize, path sums.
09
Graph exploration builds on tree traversal. Connected components, shortest paths.
Signal: Graph connectivity, shortest path, topological ordering, island counting.
10
Applies DFS/BFS to 2D grids. Very common in interviews.
Signal: 2D grid with regions, islands, flood fill, or path finding.
Phase 3: Advanced
Harder patterns that tie everything together.
11
Sort-then-merge is a clean technique that shows up in scheduling and calendar problems.
Signal: Intervals that may overlap — merge, insert, or find gaps.
12
Heaps and quickselect for ranking problems. Often combined with hash maps.
Signal: Find the k largest/smallest/most frequent elements.
13
Exhaustive search with pruning. The key is knowing when NOT to explore a branch.
Signal: Generate all combinations/permutations, or solve constraint-satisfaction puzzles.
14
The boss level. Everything before this builds the intuition you need to decompose DP problems.
Signal: Overlapping subproblems + optimal substructure. "How many ways" or "minimum cost."
1
Clarify constraints. Ask about input size, edge cases, and expected output format before writing a single line.
2
Think aloud. Interviewers want to see your reasoning. Narrate as you identify the pattern and consider trade-offs.
3
Start brute force. A working O(n²) solution beats an incomplete O(n) one. Get it correct first, then optimize.
4
Optimize with patterns. Once brute force works, name the pattern that applies: "This looks like a sliding window problem because…"
5
Test edge cases. Empty input, single element, duplicates, negative numbers. Walk through your code with at least one edge case.