The 14 Fundamental LeetCode Patterns Every Candidate Must Know
Stop memorizing 500+ problems. Learn how Two Pointers, Sliding Window, Fast & Slow Pointers, and Monotonic Stacks solve 80% of technical phone screens.
Comprehensive, pattern-based study guides curated by senior engineers to help you ace technical screens at Google, Meta, Amazon, and top startups.
Stop memorizing 500+ problems. Learn how Two Pointers, Sliding Window, Fast & Slow Pointers, and Monotonic Stacks solve 80% of technical phone screens.
Detailed breakdown of Meta's 45-minute coding rounds: why speed is king, the most frequent graph and tree questions, and how to write bug-free solutions on CoderPad.
A developer's quick reference to analyzing recursive call stacks, amortized complexity, auxiliary space, and how to discuss tradeoffs with your interviewer.
Google interviewers love problems with multiple valid approaches. Discover how to clarify requirements, test edge cases, and implement Dijkstra / Topological Sort.
A week-by-week practice roadmap balancing Arrays, Dynamic Programming, Heap/Queue, Graphs, and Mock Interviews without burning out.
A step-by-step framework to identify state transitions, base cases, and optimize memory from O(N^2) down to O(N) space.
When preparing for technical interviews, questions naturally cluster around 14 recurring patterns. Here is how to quickly recognize them during your interviews:
| Pattern | Typical Keyword / Signal | Classic Problem | Average Complexity |
|---|---|---|---|
| Sliding Window | Subarrays, substrings, contiguous elements, longest/shortest | Longest Substring Without Repeating Characters | O(N) time / O(K) space |
| Two Pointers | Sorted array, pair sums, triplets, reversing in-place | Two Sum II, 3Sum, Container With Most Water | O(N) time / O(1) space |
| Fast & Slow Pointers | Linked list cycles, midpoints, loop detection | Linked List Cycle II, Middle of Linked List | O(N) time / O(1) space |
| Monotonic Stack | Next greater element, histogram areas, temperatures | Daily Temperatures, Largest Rectangle in Histogram | O(N) time / O(N) space |
| Top K Elements (Heap) | Kth largest/smallest, stream medians, frequent elements | Top K Frequent Elements, Kth Largest in Array | O(N log K) time |
| Breadth-First Search | Shortest path in unweighted graphs, level-order traversal | Word Ladder, Binary Tree Level Order Traversal | O(V + E) time |
| Topological Sort | Course prerequisites, task dependency ordering, DAGs | Course Schedule II, Alien Dictionary | O(V + E) time |
Launch our company problem tracker to filter problems by Google, Meta, Amazon, Apple, and track your progress.
Go to Practice Dashboard