Here’s a priority order based on difficulty and frequency in FAANG interviews, categorized into High, Medium, and Low priority.
Resources
🔴 High Priority (Most Frequent & Essential for FAANG)
- Arrays
- Kadane’s Algorithm (Max Subarray Sum)
- Prefix Sum & Difference Array
- Two Pointer Technique
- Sliding Window (Fixed & Variable)
- Dutch National Flag Problem
- Next Permutation
- Merge Intervals
- Linked List
- Reverse a Linked List (Iterative & Recursive)
- Cycle Detection (Floyd’s Cycle)
- Merge Two Sorted Linked Lists
- Intersection of Two Linked Lists
- LRU Cache (Using HashMap + DLL)
- Stack & Monotonic Stack
- Next Greater Element
- Largest Rectangle in Histogram
- Trapping Rain Water
- Asteroid Collision
- Min Stack
- Queue & Deque
- Implement Queue using Stack
- Sliding Window Maximum (Using Deque)
- Sorting
- Bubble, Selection, Insertion, Merge & Quick Sort
- Bucket Sort & Counting Sort
- Binary Search
- Binary Search on Answer (Aggressive Cows, Split Array, Median of Two Sorted Arrays)
- Lower & Upper Bound
- Peak Element
- Search in Rotated Sorted Array
- Tree & BST
- Inorder, Preorder, Postorder Traversal
- Lowest Common Ancestor
- Diameter of a Binary Tree
- Validate BST
- Binary Tree to DLL
- Morris Traversal
- Serialize & Deserialize Binary Tree
- Heap (Priority Queue)
- Kth Largest/Smallest Element
- Top K Frequent Elements
- Merge K Sorted Lists
- Graph (Very Important!)
- BFS & DFS
- Cycle Detection (Directed & Undirected)
- Topological Sort (Kahn’s Algo, DFS)
- Shortest Path (Dijkstra, Bellman-Ford)
- MST (Prim’s, Kruskal’s)
- Strongly Connected Components (Kosaraju, Tarjan’s Algo)
- Union-Find (DSU) & it’s optimization
- 0-1 BFS / Multi-Source BFS
- Bipartite Graph Checking
- Dynamic Programming
- 1D DP
- 2D DP
- String DP
- Knapsack (0/1 Knapsack, Unbounded)
- Matrix Chain Multiplication
- Subset DP
- Partition Equal Subset Sum
- Count of Subsets with Given Sum
- Digit DP
- Partition Subset
- Hash + DP
- DP - Stocks
- Minimax DP
- DP on Grid
- DP + Alpha (Tricks/DS) (optional)
- DP on Trees (optional)
- DP on Graphs (optional)
🟠 Medium Priority (Important but Not Always Asked)
- Greedy Algorithms
- Interval Scheduling (Non-overlapping Intervals)
- Gas Station Problem
- Jump Game
- Job Sequencing
- Job Scheduling with Deadlines
- Interval & line sweeping algorithm
- Trie
- Implement Trie (Insert, Search, Delete)
- Word Break Problem
- AutoComplete System
- Modular Arithmetic
- Fast Exponentiation (Binary Exponentiation)
- Modular Inverse (Fermat’s Theorem)
- GCD & LCM
- Bit Manipulation