Category | Patterns | # Questions | Easy | Medium | Hard | Complexity (Avg Case) |
---|---|---|---|---|---|---|
Arrays | Sliding Window, Two Pointers, Prefix Sum | 18 | 5 | 9 | 4 | O(N) – O(N log N) |
Strings | Hashing, Two Pointers, Sliding Window | 14 | 4 | 7 | 3 | O(N) |
Linked List | Fast & Slow Pointers, Recursion | 10 | 3 | 5 | 2 | O(N) |
Stacks & Queues | Monotonic Stack, LRU Cache | 12 | 2 | 7 | 3 | O(N) |
Binary Search | Search Space Reduction, Rotated Arrays | 10 | 3 | 5 | 2 | O(log N) |
Binary Trees | DFS, BFS, Recursion | 15 | 4 | 8 | 3 | O(N) |
Tries | Prefix Matching, Dictionary Search | 5 | 1 | 3 | 1 | O(N) – O(N*M) |
Heap (Priority Queue) | Min-Heap, Max-Heap, Kth Element Search | 8 | 1 | 5 | 2 | O(N log K) |
Graphs | BFS, DFS, Topological Sort, Union-Find | 17 | 3 | 10 | 4 | O(V+E) |
Dynamic Programming (DP) | Memoization, Tabulation, Knapsack | 22 | 2 | 14 | 6 | O(N) – O(NĀ²) |
Intervals | Sorting, Merge Intervals | 7 | 2 | 4 | 1 | O(N log N) |
Backtracking | Recursion, Combinations & Permutations | 12 | 1 | 6 | 5 | O(2āæ) – O(N!) |
Bit Manipulation | XOR, Bitwise Operations | 5 | 2 | 2 | 1 | O(N) |
Math & Number Theory | GCD, Primes, Modular Arithmetic | 5 | 2 | 2 | 1 | O(N) |
Difficulty Breakdown:
ā
Easy: 35
š” Medium: 87
š“ Hard: 28
Total: 150 ā
Key Observations:
- Most questions (87) are Medium, aligning with FAANG interviews.
- Hard problems (28) appear mostly in DP, Graphs, and Backtracking.
- Arrays, Strings, Trees, and Graphs are the most frequently tested topics.
- DP (22 questions) has the highest count, followed by Graphs (17).