Month 1: Foundations and Core Data Structures
Weeks 1-2: Arrays, Strings, and Hashing
- Topics to cover:
- Arrays: Basics, Sliding Window, Two-pointer technique, Sorting algorithms.
- Strings: Palindrome, Anagram, Pattern searching (KMP, Rabin-Karp).
- Hashing: HashMap, HashSet, Counting frequency of elements, Hash functions.
- Practice Problems:
- Two Sum, Maximum Subarray, Trapping Rain Water, Longest Substring Without Repeating Characters.
- Key Concepts:
- Sorting (Merge Sort, Quick Sort).
- Prefix Sum, Kadane’s Algorithm.
Weeks 3-4: Linked Lists, Stacks, and Queues
- Topics to cover:
- Linked Lists: Single/Doubly Linked List, Fast and Slow pointers, Cycle detection.
- Stacks and Queues: LRU Cache, Stack-based problems (Next Greater Element), Monotonic Stack.
- Practice Problems:
- Linked List Cycle, Reverse Linked List, LRU Cache, Min Stack, Evaluate Reverse Polish Notation.
- Key Concepts:
- Implementing basic operations (insertion, deletion, etc.).
- Stack/Queue applications (e.g., in DFS, BFS).
Month 2: Recursion, Trees, and Graphs
Weeks 5-6: Recursion and Backtracking
- Topics to cover:
- Recursion basics, Memoization.
- Backtracking: Subsets, Permutations, N-Queens, Sudoku Solver.
- Practice Problems:
- Subsets, Word Search, Generate Parentheses, Combination Sum.
- Key Concepts:
- Recursive thinking.
- Memoization vs. Tabulation (DP).
Weeks 7-8: Trees (Binary and BST)
- Topics to cover:
- Binary Trees: Inorder, Preorder, Postorder traversal.
- Binary Search Trees: Insertion, Deletion, Lowest Common Ancestor (LCA).
- Tree problems: Depth-first search (DFS), Breadth-first search (BFS).
- Practice Problems:
- Binary Tree Inorder Traversal, Binary Search Tree Iterator, Path Sum, Serialize and Deserialize Binary Tree.
- Key Concepts:
- Tree traversal techniques (Iterative, Recursive).
- Tree Depth/Height, Balanced Trees, AVL, Red-Black Trees (basic understanding).
Month 3: Advanced Topics and Dynamic Programming