To prepare for technical interviews at top tech companies like Google, Microsoft, Amazon, and Meta, you should aim to master the following DSA topics. These companies test problem-solving skills, algorithmic thinking, and system design concepts comprehensively. Here's a complete list:
- Basics: Traversing, Searching, Sorting
- Two Pointers and Sliding Window Techniques
- Prefix Sum, Difference Arrays
- Subarray Problems (Maximum Subarray, Kadane’s Algorithm)
- Merge Intervals
- Matrix (2D Arrays): Spiral Traversal, Rotate Matrix
- Important String Problems: Palindromes, Anagram Checks
- Pattern Matching: KMP, Rabin-Karp, Z Algorithm
- Subsets and Subsequence Generation
- Permutations and Combinations
- N-Queens, Sudoku Solver
- Word Search in Grids
- Rat in a Maze
- Backtracking Optimization with Pruning
- Binary Search and Variants:
- Search in Rotated Sorted Array
- First/Last Occurrence
- Median of Two Sorted Arrays
- Sorting Algorithms:
- QuickSort, MergeSort, HeapSort
- Counting Sort, Bucket Sort, Radix Sort
- Applications of Sorting:
- Meeting Rooms, Minimum Platforms
- Singly and Doubly Linked Lists
- Detect and Remove Cycles (Floyd’s Cycle Detection)
- Merge Two Sorted Linked Lists
- Reverse Linked List (Iterative and Recursive)
- Intersection Point, Flattening Linked List
- Classic Problems:
- Next Greater Element
- Largest Rectangle in Histogram
- Min Stack, Max Stack
- Queue Variants:
- Circular Queue
- Deque (Sliding Window Maximum)
- Priority Queue (Heap)
- Implementations of Stack and Queue
- Binary Trees:
- Traversals (Inorder, Preorder, Postorder, Level Order)
- Diameter, Height of Tree
- Serialize and Deserialize a Binary Tree
- Binary Search Trees:
- Insertion, Deletion
- Lowest Common Ancestor
- Validate BST
- Tree Views (Top, Bottom, Left, Right)
- Segment Trees and Fenwick Trees
- Trie (Prefix Tree): Insert, Search, Autocomplete
- Representations: Adjacency Matrix, List
- Traversal: BFS, DFS
- Shortest Path Algorithms:
- Dijkstra, Bellman-Ford, Floyd-Warshall
- Minimum Spanning Tree: Kruskal, Prim
- Detect Cycles (Directed/Undirected Graphs)
- Topological Sorting
- Strongly Connected Components (Tarjan, Kosaraju)
- Bipartite Graph Check
- Network Flow: Ford-Fulkerson, Edmonds-Karp
- Activity Selection Problem
- Huffman Encoding
- Minimum Spanning Tree
- Fractional Knapsack
- Job Scheduling
- Gas Station Problem
- Basic Problems:
- Fibonacci, Climbing Stairs
- Knapsack Problem (0/1, Unbounded)
- Intermediate Problems:
- Longest Common Subsequence, Longest Palindromic Substring
- Longest Increasing Subsequence
- Matrix Chain Multiplication
- DP on Grids (Unique Paths, Minimum Path Sum)
- Advanced Problems:
- DP on Trees
- DP with Bitmasks
- Egg Dropping Problem
- Sorting Algorithms: MergeSort, QuickSort
- Binary Search Applications
- Closest Pair of Points
- Maximum Subarray (Kadane's Variant)
- Basics: AND, OR, XOR, NOT, Left/Right Shift
- Applications:
- Count Set Bits
- Check Power of Two
- Subsets Using Bits
- XOR Problems (Single Number, Missing Number)
- Basics:
- Path Compression, Union by Rank
- Applications:
- Cycle Detection
- Kruskal’s Algorithm
- Connected Components in Graphs
- Heap (Min-Heap, Max-Heap)
- Hash Tables and Hash Maps
- Bloom Filters
- Suffix Arrays and Trees
- LRU Cache Implementation
- Persistent Data Structures
- Pattern Matching: KMP, Rabin-Karp
- Z Algorithm
- Manacher’s Algorithm (Longest Palindromic Substring)
- Suffix Tree and Suffix Array
- Modular Arithmetic (Modular Exponentiation, Modular Inverse)
- Euclidean Algorithm (GCD/LCM)
- Sieve of Eratosthenes (Prime Numbers)
- Combinatorics (nCr, Permutations)
- Fast Fourier Transform (FFT)
- Grundy Numbers
- Nim Game
- Minimax Algorithm
- Sliding Window Problems
- Two Pointers Technique
- Interval Problems
- Design Problems (LRU Cache, Rate Limiter)
- Randomized Algorithms (Reservoir Sampling)
- Basics of Distributed Systems
- Caching, Load Balancing, Database Sharding
- Consistent Hashing, CAP Theorem
- Designing Scalable Systems (Rate Limiter, URL Shortener, Chat Application)
- Master the Foundational Topics: Arrays, Strings, Recursion, Searching/Sorting, Linked Lists.
- Focus on Graphs, Trees, and DP, as they are heavily tested.
- Practice String Algorithms, Sliding Window, and Backtracking for edge-case scenarios.
Let me know if you'd like a structured roadmap to cover these topics!