🗺 DSA Mastery — Complete Study Plan
From Zero to FAANG-Ready
Pattern-First, Intuition-Before-Code, Company-Tagged. 30 comprehensive lectures across 4 phases — including OOP, Matrix Problems, Union-Find, Monotonic Patterns, and Design DS. Every topic includes lecture notes, key patterns, sub-topic breakdown, and a full assignment. 620+ problems, FAANG-tagged.
30Total Lectures
4Phases
26Weeks
620+Problems
7Companies tagged
Phase 1 — Foundations (Wks 1–5)
Phase 2 — Core Data Structures (Wks 6–13)
Phase 3 — Advanced Algorithms (Wks 14–20)
Phase 4 — Interview Patterns & Prep (Wks 21–26)
1
Foundations
5 days
15 Q
Key Patterns
Sub-topics
- 8 primitive types, variables, and type casting
- Control flow: for, while, do-while, switch-case
- Methods: signature, return types, static vs instance
- Arrays: 1D & 2D initialization, traversal
- Big-O analysis: 4 rules, common time complexity levels
- Space complexity: auxiliary vs total space
Asked at
2 days
5 Q
Key Patterns
Sub-topics
- JVM Architecture: Stack (static) vs Heap (dynamic)
- Primitive types vs Reference types in memory
- The "Pass-by-value" reference copy behavior
- Method call stack frames and local variables
- Garbage Collection: Generational model (Young/Old)
- Common sources of Memory Leaks and prevention
Asked at
4 days
15 Q
Key Patterns
Sub-topics
- 4 pillars of OOP: Abstraction, Encapsulation, Inheritance, Polymorphism
- Interfaces vs Abstract Classes; when to use what
- Java Generics: Making collections type-safe
- ArrayList internals (dynamic resizing)
- HashMap internals (hashing, collisions)
- Comparable vs Comparator for sorting
3 days
10 Q
Key Patterns
Sub-topics
- Lambdas & Functional Interfaces (@FunctionalInterface)
- Stream API: filter, map, flatMap, findFirst, collect
- Method references (:: syntax)
- Optional<T>: Handling nulls the modern way
- Default and static methods in interfaces
- Parallel streams basics for multi-core processing
Asked at
7 days
30 Q
Key Patterns
Sub-topics
- Recursion basis: base case, recursive step, self-work
- Call stack visualization and StackOverflowError
- Subset & Permutation generation patterns
- Backtracking fundamentals: Explore, Backtrack, Choose
- N-Queens, Sudoku, Word Search, Rat in a maze
Asked at
3 days
18 Q
Key Patterns
Sub-topics
- Binary number system & 2's complement representation
- Bitwise AND, OR, XOR, NOT, Left/Right Shifts
- Bit manipulation tricks: get/set/clear/toggle bit
- Checking if a number is a power of 2: n & (n-1) == 0
- Finding the only non-repeating element (XOR property)
Asked at
3 days
20 Q
Key Patterns
Sub-topics
- Prime check O(√N), Sieve of Eratosthenes O(N log log N)
- GCD/LCM: Euclidean & Extended Euclidean algorithm
- Modular Arithmetic: (a+b)%m rules, modular inverse basics
- Fast Exponentiation (Binary Exponentiation) O(log N)
- Basic combinatorial math: nCr, factorials
Asked at
2
Core Data Structures
6 days
35 Q
Key Patterns
Sub-topics
- 2D Prefix sums: submatrix sum queries
- Kadane's algorithm (max subarray) & variants
- Dutch national flag (3-way partition)
- In-place rotation (Reversal algorithm)
- String immutability & StringBuilder best practices
4 days
25 Q
Key Patterns
Sub-topics
- Comparison-based sorts: time & space audit
- Merge Sort & Quick Sort: Divide & Conquer paradigms
- Counting Sort & Radix Sort: Non-comparison scaling
- Cyclic Sort: The range-limited array invariant
- Custom sorting with Comparator (Largest Number, Wiggle Sort)
5 days
28 Q
Key Patterns
Sub-topics
- Binary search template: avoiding infinite loops
- Rotated arrays, Peak elements, and boundary seeking
- Binary Search on Answer Space (Monotonic Optimization)
- 2D Matrix Searching (Staircase search vs Flattened BS)
6 days
28 Q
Key Patterns
Sub-topics
- Singly, doubly, and circular list implementations
- Floyd's tortoise & hare for cycle detection
- In-place Reversal & Reverse in K-Groups
- LRU Cache & O(1) LFU Cache implementation
- Deep copy with random pointers & Flattening LL
5 days
25 Q
Key Patterns
Sub-topics
- Stack/Queue implementation: Array vs LinkedList
- Balanced parentheses & Postfix/Prefix evaluation
- Monotonic stack: PGE/NSE patterns
- Deque: The sliding window maximum problem
- Stack simulating recursion (DFS baseline)
Asked at
4 days
22 Q
Key Patterns
Sub-topics
- Hashing fundamentals: collision resolution strategies
- Java HashMap internals: resize/rehashing
- Two-sum, 3-sum, 4-sum patterns
- Group anagrams & isomorphic strings
- Subarray sum equals K (prefix sum + hashmap)
Asked at
4 days
24 Q
Key Patterns
Sub-topics
- Spiral Matrix traversal and generation
- Rotate Image (90 deg) in-place safely
- Search in 2D sorted matrix (Staircase search)
- Set matrix zeroes using first row/col as markers
Asked at
10 days
50 Q
Key Patterns
Sub-topics
- Recursive & Iterative traversals and diameter
- Left, Right, Top, and Bottom views of a tree
- Path sum, max path sum, and LCA in O(N)
- BST searching, insertion, and deletion logic
- Validating BST properties using bounds
Asked at
8 days
29 Q
Key Patterns
Sub-topics
- SiftUp, SiftDown & Floyd's O(N) buildHeap
- Priority queue in Java (custom comparators)
- Finding median from a data stream (two heaps)
- Task scheduler & meeting rooms II patterns
- K-way merge with heap-tracked list pointers
Asked at
3
Advanced Algorithms
10 days
35 Q
Key Patterns
Sub-topics
- Adjacency list/matrix & BFS/DFS templates
- Connected components & island problems
- Dijkstra’s algorithm for weighted shortest paths
- Kahn’s algorithm & DFS for topological sorting
- Bipartite graph check & Cycle detection (Directed/Undirected)
3 days
15 Q
Key Patterns
Sub-topics
- DSU class: find() with compression & union() by rank
- Number of provinces & Redundant connection
- Kruskal's MST algorithm vs Prim's algorithm
- Graph validity: cycle detection using DSU
5 days
22 Q
Key Patterns
Sub-topics
- Proving greedy: Exchange argument & greedy stay ahead
- Activity selection & Jump game I/II
- Gas station circular circuit & Lemonade change
- Job sequencing with deadlines & Task scheduler
3 days
12 Q
Key Patterns
Sub-topics
- Sorting by start vs end time for interval processing
- Meeting rooms I/II & Merge/Insert Intervals
- Corporate flight bookings using difference arrays
- Skyline: sweep line with PriorityQueue/TreeMap
15 days
60 Q
Key Patterns
Sub-topics
- 0/1 & Unbounded Knapsack: Coin change, Rod cutting
- String DP: LCS, Edit Distance, Palindromic substrings
- Grid DP: Unique paths, min path sum, dungeon game
- DP on trees: House Robber III, binary tree cameras
- Space optimization: reducing O(N²) to O(1) rows
4 days
18 Q
Key Patterns
Sub-topics
- TrieNode class construction & recursive search
- Autocomplete Suggestions using Word counts
- Maximum XOR pair in an array using Binary Trie
- Word Break problem optimization with Tries
6 days
25 Q
Key Patterns
Sub-topics
- Segment Tree construction and recursive range queries
- Point updates vs Range updates (Lazy prop)
- Fenwick Tree (BIT) for prefix sum optimizations
- Count of smaller numbers after self (Coordinate compression)
3 days
10 Q
Key Patterns
Sub-topics
- SQRT fundamentals: processing blocks of size √N
- Mo’s Algorithm: sorting queries for O((N+Q)√N) performance
- Range Distinct Elements & most frequent element problems
- Offline query processing vs online updates
Asked at
4
Interview Patterns & Prep
4 days
15 Q
Key Patterns
Sub-topics
- Inversion count using Merge Sort logic
- Closest pair of points (Divide & Conquer)
- Subset sum using Meet-in-the-middle O(2^(N/2))
- Median of two sorted arrays (Hard variant)
5 days
25 Q
Key Patterns
Sub-topics
- 3-sum and 4-sum optimizations
- Maximum window sum and distinct character counts
- Smallest window containing all characters of another string
- Longest palindromic substring (Diverging pointers)
Asked at
5 days
18 Q
Key Patterns
Sub-topics
- KMP: Efficient pattern matching in O(N+M)
- Z-algorithm: Linear time pattern search
- Rabin-Karp: Rolling hash for plagiarism detection
- Manacher's Algorithm for Longest Palindromic Substring O(N)
4 days
15 Q
Key Patterns
Sub-topics
- NGE/NSE/PGE/PSE: Unified pattern
- Largest rectangle in histogram O(N)
- Sum of subarray minimums (Contribution)
- Trapping rain water (Monotonic stack approach)
4 days
10 Q
Key Patterns
Sub-topics
- Design LRU Cache (Least Recently Used)
- Design LFU Cache (Least Frequently Used)
- Min Stack / Max Stack / Min Queue
- SkipList: A probabilistic alternative to balanced trees
7 days
Mixed
UMPIRE Framework
Sub-topics
- Timed mock rounds (45 mins)
- Communication & thinking out loud
- Behavioral prep (STAR method)
- Identifying patterns in 60 seconds