Blind 75 — Pattern Walkthrough

The famous list, reorganized by pattern with the key insight for each problem — so you learn 15 ideas, not 75 answers.

blind-75problem-listinterview-prep

How to use this list

The Blind 75 (a Facebook engineer's curated LeetCode list) endures because it's the minimal set covering nearly every pattern interviews draw from. Used wrong, it's 75 memorized solutions that evaporate under pressure. Used right, it's ~15 patterns, each seen from 3–6 angles — this page groups it that way, with the one-line insight per problem.

Protocol per problem: attempt 25–30 min cold → if stuck, read only the insight here and try again → solved or not, say the approach out loud in one sentence → log it for re-attempt in a week (self-rate with the problem bank flashcards, schedule via the study plan). Marking "solved" after reading a solution is the cardinal sin — re-derive, days later, or it didn't happen.

Arrays & Hashing — hash tables, arrays

ProblemThe insight
Two Sumdict of seen values → complement lookup, one pass
Contains Duplicateset membership
Product of Array Except Selfprefix products × suffix products, no division
Maximum SubarrayKadane: running sum, reset when it goes negative (1-D DP in disguise)
Maximum Product Subarraytrack running max and min (negatives flip them)
Top K Frequentcount dict → bucket-by-frequency (or heap)
Group Anagramscanonical key: sorted word / letter counts
Valid Anagramcounting dict
Longest Consecutive Sequenceset + only start counting at left edges (x−1 absent)
Encode/Decode Stringslength-prefix framing — delimiters alone can't be safe

Two Pointers — doc

ProblemThe insight
Valid Palindromeopposite ends, skip non-alphanumerics
3Sumsort; fix one, two-pointer the rest; skip duplicates carefully
Container With Most Watermove the shorter wall inward — exchange argument
Trapping Rain Waterwater[i] = min(maxL, maxR) − h[i]; two pointers carry the maxes

Sliding Window — doc

ProblemThe insight
Best Time to Buy/Sell Stockrunning min, best diff — window degenerates to one pass
Longest Substring Without Repeatingwindow + set; shrink from left past the repeat
Longest Repeating Character Replacementwindow valid while (size − maxFreq) ≤ k
Minimum Window Substringneed/have counts; expand right, shrink left greedily

Stack — doc

ProblemThe insight
Valid Parenthesesthe canonical LIFO match

Binary Search — doc

ProblemThe insight
Search Rotated Sorted Arrayone half is always sorted — decide which, recurse into the right one
Find Min in Rotated Sorted Arraycompare mid to right end; shrink toward the bend

Linked List — doc

ProblemThe insight
Reverse Linked Listthe three-pointer dance, from memory, both directions of asking
Merge Two Sorted Listsdummy head + two pointers
Reorder Listmiddle → reverse second half → interleave (three sub-skills)
Remove Nth From Endlead pointer n ahead, then move both
Linked List CycleFloyd fast/slow
Merge K Sorted Listsheap of k heads — O(N log k)

Trees — doc

ProblemThe insight
Max Depththe 3-line recursion template
Same Tree / Invert Treesimultaneous recursion / swap-and-recurse
Subtree of Another Treesame-tree check at every node
LCA of a BSTwalk from root until the targets split
Validate BST(low, high) bounds passed down — child-check fails
Level Order TraversalBFS queue, level = current queue length
Kth Smallest in BSTin-order traversal, count down
Construct from Preorder + Inorderpreorder[0] is root; inorder splits children
Binary Tree Max Path Sumpost-order: best one-leg path up vs best arch through
Serialize/Deserializepreorder with null markers

Tries — doc

ProblemThe insight
Implement Triechildren dict + end-flag
Word Search IItrie over dictionary guides grid backtracking — prune dead prefixes
Design Add & Search Words'.' wildcard → branch into all children (DFS)

Heap — doc

ProblemThe insight
Find Median from Data Streamtwo heaps: max-heap lower half, min-heap upper, rebalance

Backtracking — doc

ProblemThe insight
Combination Sumchoose/explore/un-choose; reuse allowed → don't advance index
Word Searchgrid DFS + mark/unmark visited

Graphs — doc

ProblemThe insight
Number of Islandsflood fill (BFS/DFS) per unvisited land cell
Clone Graphdict old→new while traversing
Pacific Atlantic Water Flowreverse-flow BFS from both oceans; intersect
Course Schedulecycle detection = topological sort (Kahn's / DFS colors)
Graph Valid Treeconnected + exactly n−1 edges (union-find)
Number of Connected Componentsunion-find counting, or DFS sweeps
Alien Dictionarybuild precedence edges from adjacent words → topo sort

Intervals — greedy + heaps

ProblemThe insight
Insert Intervalthree phases: before, merge-overlaps, after
Merge Intervalssort by start; extend or push
Non-overlapping Intervalsmax meetings kept (sort by end) → n − kept
Meeting Rooms I / IIoverlap check / heap of end times

1-D DP — doc

ProblemThe insight
Climbing StairsFibonacci — the hello-world recurrence
House Robber I / IItake[i] vs skip[i]; circular → run twice excluding one end
Coin Changemin coins per amount, bottom-up (the greedy-fails poster child)
Longest Increasing SubsequenceO(n²) DP, or patience trick with binary search O(n log n)
Word Breakdp[i] = any dp[j] && s[j:i] in dict
Decode Waysclimbing stairs with validity conditions
Palindromic Substrings / Longest Palindromic Substringexpand around 2n−1 centers

2-D DP & Strings

ProblemThe insight
Unique Pathsgrid[i][j] = top + left
Longest Common Subsequencematch → diag+1; else max(top, left)

The remainder (bit/math/matrix — appear less, finish last)

Set/Clear bits family (Number of 1 Bits, Counting Bits, Missing Number, Reverse Bits, Sum of Two Integers), Rotate Image (transpose + reverse rows), Spiral Matrix (shrink four boundaries), Set Matrix Zeroes (first row/col as markers).

The order that compounds

Do the groups top-to-bottom as listed — each reuses the previous (3Sum needs two pointers; trees need recursion comfort; graphs need BFS from trees; intervals need greedy). Two groups per week with re-attempts is a realistic 6-week pass; see the study plan for scheduling, then graduate to mock drills.

Interview perspective

Practice

The page is the practice. Track group-by-group; when all groups are green twice, you're ready for mock drills — the last step before the real thing.