12 LeetCode Patterns That Cover 80% of FAANG Questions
Why You Still Fail After 300 LeetCode Problems
You've solved 300 problems. Then an interviewer twists Number of Islands slightly, and you freeze.
You're not alone. That's the #1 thread on r/leetcode and X right now: grinding volume doesn't transfer.
Analysis of 800+ FAANG interviews from 2024 to Q1 2026 plus LeetCode Top 200 frequency shows the same small set recurs in ~80% of coding rounds. Not 200 random problems. 12 patterns.
Learn the 12 deeply, recognize the signal in under a minute, and you stop memorizing solutions and start solving cold.
This is the 2026 pattern-first reference: what each pattern is, the signal phrase that triggers it, one canonical LeetCode example, and where it shows up most.
Why Patterns Beat Problem-Grinding in 2026
Interviewers in 2026 don't reward problem count. CoderPad's 2026 survey found algorithmic questions still lead at 43%, but interviewers now probe three things:
- Can you explain why you picked this data structure?
- Can you handle a variation you haven't seen?
- Can you verify and test like an engineer, including catching AI mistakes?
Patterns train exactly that. Topics train recall.
Two candidates with 300 solved can be on opposite sides of hire-ready depending on coverage. The one who did 80 well-chosen Mediums across all 12 patterns with review beats the one who did 300 random Easies.
Rule: if you can't name the pattern within 60 seconds of reading, you haven't learned it yet.
How to Read This Guide
Patterns are ordered by approximate FAANG frequency. Top 5 alone cover ~50-60%.
For each, focus on The signal — the words or constraints that tell you to reach for it. That's what separates fast solvers.
Target times for interview-ready (Tier 1 problems): Easy 12 min, Medium 22 min, Hard 38 min, including dry run and complexity analysis.
1. Two Pointers
What it is: Two indices moving toward each other or in same direction to avoid O(n²) brute force.
The signal: Sorted array, pair/triplet sum, "remove duplicates in-place," palindrome, "container," closest sum.
Canonical example: LC 15 3Sum, LC 11 Container With Most Water, LC 42 Trapping Rain Water.
Where in 2026: Everywhere. Every FAANG. The default warmup filter.
Practice to 15-20 problems. Master opposite-ends vs. fast-slow distinction.
2. Sliding Window
What it is: Maintain a dynamic window [left, right] with a hashmap/count to satisfy a constraint in O(n).
The signal: "Longest/shortest substring/subarray with K distinct / at most / minimum," "permutation in string."
Canonical example: LC 3 Longest Substring Without Repeating Characters, LC 76 Minimum Window Substring (Meta, Amazon favorite Hard), LC 424 Longest Repeating Character Replacement.
Where in 2026: Heavy at Amazon and Meta. LC 76 and LC 239 Sliding Window Maximum are classic L4+ differentiators.
If you mix up fixed vs. variable window, drill that first.
3. HashMap and Set
What it is: O(1) lookup for complements, frequencies, visited state. Often hidden inside other patterns.
The signal: "Find pair with sum X," "duplicates," "frequency," "group anagrams," "first unique."
Canonical example: LC 1 Two Sum, LC 49 Group Anagrams, LC 128 Longest Consecutive Sequence.
Where in 2026: Single most common building block. 20-25 problems recommended for new-grad to mid.
Always ask: can a map turn my nested loop into one pass?
4. Binary Search and Search on Answer
What it is: Halve search space on sorted/monotonic property. Extension: binary search the answer value, not the index.
The signal: "Sorted / rotated array," "find minimum/maximum feasible," "Koko," "capacity," "split array largest sum."
Canonical example: LC 33 Search in Rotated Sorted Array, LC 153 Find Minimum in Rotated Sorted Array, LC 875 Koko Eating Bananas, LC 4 Median of Two Sorted Arrays (Google L5+ Hard).
Where in 2026: Google loves hard variants. 12-18 problems, 70% Medium.
Template to memorize: lo/hi loop with mid = lo + (hi-lo)//2, and a feasible(mid) function for answer-search.
5. DFS / BFS on Trees and Graphs
What it is: Traverse grids, trees, graphs with recursion/stack (DFS) or queue by levels (BFS).
The signal: "Islands," "connected components," "shortest path in unweighted grid," "level order," "clone graph," "course schedule."
Canonical example: LC 200 Number of Islands (Google, Meta, Amazon top 3), LC 102 Binary Tree Level Order, LC 207 Course Schedule.
Where in 2026: 25-35 tree/graph problems recommended. Islands + Clone Graph + LCA cover most loops.
Write BFS and DFS both ways. Interviewers often ask: "now do it iteratively."
6. Merge Intervals and Heap / Top K
What it is: Sort by start time to merge overlaps. Heap to keep K best/smallest without full sort.
The signal: "Merge / insert / erase overlap," "meeting rooms," "K largest/smallest/frequent/closest."
Canonical example: LC 56 Merge Intervals, LC 57 Insert Interval, LC 295 Find Median from Data Stream, LC 347 Top K Frequent Elements, LC 146 LRU Cache (design + hashmap + doubly linked list).
Where in 2026: LRU Cache is the classic L4+ filter at every FAANG. Heaps show up at Amazon constantly.
Learn the 6-line interval merge cold. Learn when heap beats sorting: streaming or K << n.
7. Dynamic Programming
What it is: Optimal value from overlapping subproblems. Top-down memo vs. bottom-up table.
The signal: "Minimum cost / maximum value / number of ways / longest / can you reach," with choice at each step.
Canonical example: LC 53 Maximum Subarray, LC 121 Best Time to Buy and Sell Stock, LC 322 Coin Change, LC 198 House Robber, LC 300 Longest Increasing Subsequence.
Where in 2026: Google uses DP heavily. Amazon loves Coin Change / Knapsack variants.
Don't start with Hard DP. Master 1D (Climbing Stairs, House Robber) -> 2D grid -> Knapsack -> LCS. State the recurrence out loud before coding.
8. Backtracking
What it is: Build candidates incrementally, abandon dead branches. DFS + undo choice.
The signal: "All combinations / permutations / subsets," "generate parentheses," "word search," "N-Queens."
Canonical example: LC 78 Subsets, LC 46 Permutations, LC 39 Combination Sum, LC 79 Word Search, LC 51 N-Queens (Apple Hard favorite).
Where in 2026: Less frequent but high signal for thoroughness. Meta asks Combination Sum / Permutations often.
Template: choose -> explore -> unchoose. Practice explaining time complexity: O(N! / 2^N) why?
9. Monotonic Stack and Arrays / Matrix Tricks
What it is: Decreasing/increasing stack to find next greater/smaller in O(n). In-place matrix manipulation.
The signal: "Next greater element," "daily temperatures," "largest rectangle," "trapping rain water," "rotate image."
Canonical example: LC 739 Daily Temperatures, LC 84 Largest Rectangle in Histogram, LC 20 Valid Parentheses, LC 48 Rotate Image.
Where in 2026: Amazon's favorite Hard filter. If you can derive Monotonic Stack live, you stand out.
Draw the stack evolution. Interviewers want to see monotonic invariant reasoning.
10. Fast and Slow Pointers / Linked List Manipulation
What it is: Two pointers at different speeds for cycles, middle, kth-from-end. In-place reversal/merge.
The signal: Explicit "linked list," "cycle," "middle node," "reverse," "merge two lists," "reorder."
Canonical example: LC 141 Linked List Cycle (Floyd), LC 206 Reverse Linked List, LC 21 Merge Two Sorted Lists, LC 19 Remove Nth Node From End.
Where in 2026: Common phone-screen filter. Easy to fumble under pressure if you only practiced arrays.
Practice without visual aid. Null-check narration matters more than code here.
11. Topological Sort and Union-Find
What it is: Order DAG nodes by dependencies (Kahn's / DFS). Union-Find for dynamic connectivity.
The signal: "Prerequisites," "course schedule," "build order," "connected components," "redundant connection," "number of provinces."
Canonical example: LC 207 Course Schedule, LC 210 Course Schedule II, LC 200 Number of Islands (Union-Find variant), LC 684 Redundant Connection.
Where in 2026: 10-15% of senior loops at Google/Amazon. Rare but decisive when it appears.
Know both cycle detection methods. Know path compression in one sentence.
12. Trie and Bit Manipulation
What it is: Prefix tree for word search/autocomplete. XOR/bit tricks for O(1) space.
The signal: "Prefix," "autocomplete," "word search II," "add and search word," "XOR," "single number," "bits."
Canonical example: LC 208 Implement Trie, LC 211 Add and Search Word, LC 212 Word Search II (Trie + DFS, Meta/Amazon Hard), LC 136 Single Number (XOR cancel).
Where in 2026: 3-5% of rounds, Google slightly more. Low frequency, high memory-signal.
Implement Trie from scratch once. Memorize XOR properties: a^a=0, a^0=a.
How They Combine in Real Interviews
The gap between pattern learners and offer holders is combination.
Seen in 2026 loops:
- Sliding Window + HashMap: LC 76, LC 567
- BFS + Topological Sort: Course Schedule II
- Trie + DFS Backtracking: Word Search II
- Binary Search + DP / Greedy check: Split Array, Ship Packages
- Monotonic Stack + DP: Trapping Rain Water, Largest Rectangle
Practice prompt: after solving, ask "what two patterns did I just combine?" Write it in your mistake log.
Your 12-Week Plan to Solve Cold
If you have 12-15 hrs/week:
Month 1 – Tier 1 (25 must-solve): Two Sum, Islands, Best Time to Buy/Sell, Min Window, Merge Intervals, Longest Substring, Max Subarray, Coin Change, Rotated Search, LRU Cache + 15 more from patterns 1-6. 5-6/week. Re-solve cold next day.
Month 2 – Tier 2 (next 25): Container Water, 3Sum, Trapping Rain, Sliding Window Max, Median Sorted Arrays, Koko, Top K, Course Schedule, Clone Graph, Rotting Oranges, etc.
Month 3 – Tier 3 + spaced repetition: N-Queens, Word Search II, Largest Rectangle, Next Permutation, Rotate Image + revisit Tier 1 until any Tier 1 solves in <20 min with narration.
Protocol per problem:
- Say signal + pattern choice in 60 sec
- State brute force then optimal + O(time/space)
- Code clean, dry-run one edge case
- Write 2-line pattern note, revisit day 3/7/21
Stop adding problems after 300-400 (new-grad) or 150-250 (mid). Switch to mocks, system design, and behavioral. Grinding past 500 without an offer is the most common avoidable failure in 2026 — the issue is communication and variations, not count.
For structured frontend + DSA interview practice, try mentoxis.com/fe-questions alongside LeetCode.
Conclusion
Blind 75 was great for 2020. In 2026, interviewers shifted to variations, explanation, and AI-era verification.
You don't need 500 random solves. You need 12 patterns deeply, ~150 well-reviewed problems, timed narration, and combination fluency.
Start with Two Pointers, Sliding Window, and Graphs this week. Master the signal, not just the solution.
Want senior-level mentorship for FAANG loops, mocks, and system design? Explore mentorship programs at mentoxis.com — learn to solve cold, explain clearly, and turn interviews into competing offers.
Originally published in JavaScript in Plain English on Medium.
Ready to put this into practice?
Book a 1:1 mock interview with a FAANG engineer, or work through free interview questions with a live code editor.