A complete, curriculum-grade guide to mastering algorithmic patterns and cracking product-based company coding rounds.
Cracking top-tier technical interviews at Google, Meta, Amazon, Microsoft, Apple, and high-growth tech startups requires far more than memorizing code solutions. Interviewers evaluate candidates on three foundational pillars:
Our 1,464-Problem Master Tracker combines and deduplicates the world's premier coding sheets ā Striver's A2Z DSA Sheet (460), Love Babbar 450 (453), NeetCode 250 & 150, and Apna College Sheet (184) ā arranged into a rigorous 18-step learning journey.
| Data Structure / Algorithm | Average Time | Worst Case Time | Space Complexity |
|---|---|---|---|
| Array Access / Lookup | O(1) | O(1) | O(1) |
| Binary Search (Sorted Array) | O(log N) | O(log N) | O(1) |
| Hash Table (Lookup / Insert) | O(1) | O(N) (hash collision) | O(N) |
| Binary Search Tree (BST) | O(log N) | O(N) (skewed) | O(N) |
| Quick Sort | O(N log N) | O(N²) | O(log N) |
| Merge Sort | O(N log N) | O(N log N) | O(N) |
| Heap Push / Pop (Priority Queue) | O(log N) | O(log N) | O(N) |
| BFS / DFS Graph Traversal | O(V + E) | O(V + E) | O(V) |
| Dijkstra's Shortest Path | O((V + E) log V) | O((V + E) log V) | O(V) |
Over 85% of all LeetCode Medium and Hard interview questions resolve into these repeatable algorithmic patterns:
Ideal for sorted arrays or LinkedLists when searching for pairs, triplets, or in-place partitioning (e.g. 2Sum II, 3Sum, Trapping Rain Water).
For contiguous subarrays/substrings with length, sum, or character frequency constraints (e.g. Minimum Window Substring, Longest Substring Without Repeating Characters).
Cycle detection, finding middle nodes, and palindrome checking in linear structures without extra memory (e.g. Floyd's Cycle, Linked List Middle).
Resolving overlapping ranges, scheduling conflicts, and calendar booking intervals (e.g. Insert Interval, Non-overlapping Intervals).
Finding the Next Greater/Smaller Element in O(N) linear time (e.g. Daily Temperatures, Largest Rectangle in Histogram).
Tracking K smallest/largest elements dynamically using Min/Max Heaps in O(N log K) time (e.g. Kth Largest Element, Top K Frequent Elements).
Searching in rotated, bitonic, or unbounded sorted arrays and answer spaces (e.g. Search in Rotated Sorted Array, Book Allocation Problem).
Level-order traversals, vertical paths, diameter, and Lowest Common Ancestor (LCA) in hierarchical tree structures.
Ordering directed acyclic graphs (DAGs) for dependency resolution and build systems (e.g. Course Schedule I & II, Alien Dictionary).
Dynamic programming on subsets with weight and value constraints (e.g. Partition Equal Subset Sum, Coin Change).
2D String DP patterns for edit distance, wildcard matching, and string alignment (e.g. Edit Distance, Distinct Subsequences).
Near-O(1) connected components and cycle detection in undirected graphs with path compression (e.g. Kruskal's MST, Redundant Connection).
Language syntax (C++, Java, Python), time and space complexity derivation, basic number theory (GCD, Primes, Sieve of Eratosthenes), and recursion fundamentals.
Selection, Bubble, Insertion, Merge Sort, Quick Sort, and stable sorting properties with recursion tree visualizations.
Kadane's Algorithm, Dutch National Flag, Pascal's Triangle, 2Sum, 3Sum, 4Sum, Next Permutation, and Rotate Matrix.
Binary Search on 1D arrays, Matrix Binary Search, and BS on Answer Space (Aggressive Cows, Koko Eating Bananas, Capacity to Ship Packages).
Anagrams, Isomorphic Strings, Longest Palindrome, String Compression, and KMP / Rabin-Karp pattern searching.
Singly and Doubly Linked Lists, Reversal, Cycle Detection, LRU Cache, LFU Cache, and Merge K Sorted Lists.
N-Queens, Sudoku Solver, Combination Sum I & II, Subset Sum, Palindrome Partitioning, and Word Search.
Bitwise operators, Counting Set Bits, Single Number I/II/III, Power Set generation with bitmasks, and XOR equations.
Min Stack, Infix/Postfix evaluation, Monotonic Stacks, Trapping Rain Water, Largest Rectangle in Histogram, and Sliding Window Maximum.
Variable and fixed-size windows: Longest Substring with At Most K Distinct Characters, Fruit Into Baskets, and Subarrays with K Different Integers.
Min/Max Heap creation, Find Median from Data Stream, Task Scheduler, and Minimum Cost to Connect Sticks.
Activity Selection, N Meetings in One Room, Job Sequencing with Deadlines, Fractional Knapsack, and Gas Station.
Preorder, Inorder, Postorder, Level Order, Zig-Zag, Max Path Sum, Tree Diameter, Boundary Traversal, and Tree Serialization.
Search, Insert, Delete, LCA in BST, Validate BST, Two Sum IV, Recover BST, and Largest BST in Binary Tree.
BFS, DFS, Cycle Detection, Kahn's Topological Sort, Dijkstra, Bellman-Ford, Floyd-Warshall, Prim's & Kruskal's MST, and Disjoint Set Union (DSU).
1D DP (House Robber), 2D Grid DP (Unique Paths), DP on Subsequences (0/1 Knapsack), DP on Strings (LCS, Edit Distance), LIS (Longest Increasing Subsequence), Partition DP (MCM), and DP on Trees.
Prefix Trees (Trie): Insert, Search, StartsWith, Complete String, Word Search II, and Maximum XOR of Two Numbers in Array.
Segment Trees, Fenwick Trees (Binary Indexed Tree), Tarjan's Algorithm for Bridges & Articulation Points in Graphs.
Track your progress with real-time checkboxes, star problems for revision, write Big-O notes, and auto-sync with your LeetGitSyncPro extension.
Open 450 DSA Tracker →