30 Lectures · 4 Phases
620+ Problems
🗺 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
Weeks 1–5 · 7 topics · ~110 problems — Build the mental models everything else rests on
7 Topics
⚙️
Lecture 01
Java & Programming Fundamentals
Data types, loops, Big-O, basic collections intro
5 days 15 Q
Key Patterns
Iteration patternsBig-O rules Array manipulationSpace complexity
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
GoogleAmazon Microsoft
🧠
Lecture 02
Java Memory Management
Stack vs Heap, reference types, and Garbage Collection
2 days 5 Q
Key Patterns
Pass-by-valueStack frames GC eligibilityObject lifecycle
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
GoogleOracle Goldman Sachs
🏗️
Lecture 03
OOP & Java Collections
Interfaces, generics, internal workings of collections
4 days 15 Q
Key Patterns
AbstractionEncapsulation Interface-led designGeneric types
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
Lecture 04
Java 8+ Modern Features
Lambdas, Streams, Optional, functional interfaces
3 days 10 Q
Key Patterns
Stream FilteringMap-Reduce Lambda SortingFunctional Interface
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
AmazonLinkedIn Salesforce
🔁
Lecture 05
Recursion & Backtracking
Call stack, include/exclude, backtracking template
7 days 30 Q
Key Patterns
Recursive treeInclude/Exclude Backtracking templatePruning
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
GoogleAmazon FacebookApple
📊
Lecture 06
Bit Manipulation
Binary math, masking, cancellation tricks
3 days 18 Q
Key Patterns
XOR cancellationBit masking Power of 2 checkBrian Kernighan
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
AmazonMicrosoft Google
🔢
Lecture 07
Math & Number Theory
Primes, Sieve, GCD, Modular arithmetic
3 days 20 Q
Key Patterns
Sieve of EratosthenesEuclidean GCD Modular exponentiationPrime factorization
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
AmazonGoldman Sachs Microsoft
2
Core Data Structures
Weeks 6–13 · 9 topics · ~250 problems — The fundamental structures for 90% of interview problems
9 Topics
📋
Lecture 08
Arrays & Strings — Deep Dive
Prefix sums, Kadane's, Dutch flag, rotation
6 days 35 Q
Key Patterns
Prefix sumKadane's algorithm Dutch national flagIn-place rotation Frequency maps
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
Lecture 09
Sorting Algorithms
Bubble, Selection, Insertion, Merge, Quick, Heap sort
4 days 25 Q
Key Patterns
Merge sort stabilityQuickSelect O(N) Cyclic sortCounting sort O(N+K)
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)
🔍
Lecture 10
Search Algorithms
All BS variants, BS on answer, search in rotated array
5 days 28 Q
Key Patterns
Binary search on answerRotated array search First/last occurrenceAnswer Space Optimization
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)
🗂️
Lecture 11
Linked Lists
Floyd's cycle, reversal, merge, LRU Cache baseline
6 days 28 Q
Key Patterns
Fast & slow pointersReverse in-place Merge sorted listsCycle detection
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
📚
Lecture 12
Stacks & Queues
Monotonic stack, deque, queue-based BFS baseline
5 days 25 Q
Key Patterns
Monotonic stackNext greater element Sliding window maxBFS scaffolding
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
GoogleAmazon MicrosoftFacebook/Meta
🗃️
Lecture 13
HashMap & HashSet
Hashing internals, frequency maps, Two-sum family
4 days 22 Q
Key Patterns
Frequency countingComplement lookup Group by keyHashing internals
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
GoogleAmazon MicrosoftFacebook/Meta
🧮
Lecture 14
Matrix Problems
Spiral, in-place rotation, Search matrix II
4 days 24 Q
Key Patterns
Spiral traversalIn-place rotation Grid DFS/BFSMulti-Source BFSCorner Walk O(m+n)
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
GoogleAmazon MicrosoftFacebook/Meta
🌳
Lecture 15
Trees (Binary & BST)
All traversals, path problems, LCA, BST properties
10 days 50 Q
Key Patterns
DFS (Pre/In/Post)BFS Level-order LCAHeight recursion BST validation
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
GoogleAmazon MicrosoftFacebook/MetaApple
⛰️
Lecture 16
Heaps & Priority Queues
Min/max heap build, Top-K, two heaps, K-way merge, greedy scheduling
8 days 29 Q
Key Patterns
Heap build O(N)Top-K elements Two heaps (median)K-way merge Greedy heap
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
GoogleAmazon MicrosoftFacebook/MetaApple
3
Advanced Algorithms
Weeks 14–20 · 8 topics · ~180 problems — The differentiators that separate good candidates from great ones
8 Topics
🕸️
Lecture 17
Graphs (BFS & DFS)
Representations, traversals, cycles, Dijkstra, Topo sort
10 days 35 Q
Key Patterns
BFS shortest pathDFS pathfinding Cycle detectionTopological sort Dijkstra's O(E log V)
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)
🔗
Lecture 18
Union-Find (DSU)
Path compression, union by rank, Kruskal's MST
3 days 15 Q
Key Patterns
Path compressionUnion by rank/size Kruskal's algorithmDynamic connectivity
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
💡
Lecture 19
Greedy Algorithms
Local optimization, interval scheduling, Huffman
5 days 22 Q
Key Patterns
Interval selectionHuffman coding Greedy + SortingFractional knapsack
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
📐
Lecture 20
Intervals & Sweep Line
Event sweep, difference arrays, Skyline problem
3 days 12 Q
Key Patterns
Event sweep (+1/-1)Merge intervals Skyline algorithmDifference array
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
🧩
Lecture 21
Dynamic Programming
Memoization, tabulation, knapsack, LCS, LIS, grid DP
15 days 60 Q
Key Patterns
Knapsack familyLCS/LIS patterns Grid/Path DPMemoization template Partition DP
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
🔤
Lecture 22
Tries (Prefix Trees)
Auto-complete, insert/search, XOR max trie
4 days 18 Q
Key Patterns
Prefix lookupWord search II XOR max trieSuggestion system
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
📊
Lecture 23
Segment Trees & BIT
Range queries, point updates, lazy propagation, Fenwick
6 days 25 Q
Key Patterns
Range sum/min/maxPoint update O(log N) Lazy propagationFenwick BIT
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)
🪵
Lecture 24
Square Root Decomposition
Mo's Algorithm, block-based range queries (NEW)
3 days 10 Q
Key Patterns
Block decompositionMo's Algorithm Block point updatesFreq of Freqs
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
GoogleUber Directi
4
Interview Patterns & Prep
Weeks 21–26 · 6 topics · ~80 problems — Mastering the "Hard" patterns and final polish
6 Topics
🔁
Lecture 25
Advanced Recursion
Divide & Conquer, Meet-in-the-middle, Partitioning
4 days 15 Q
Key Patterns
Divide & ConquerMeet in the middle Binary search on spacePartitioning
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)
👆
Lecture 26
Two Pointers & Sliding Window
Converging pointers, variable windows, multi-window strings
5 days 25 Q
Key Patterns
Left-Right convergenceExpand/Shrink window Minimum window substringTrapping water
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
GoogleAmazon Facebook
🔡
Lecture 27
String Algorithms
KMP, Z-algorithm, Rabin-Karp, Manacher's
5 days 18 Q
Key Patterns
LPS array (KMP)Z-array (Z-algo) Rolling hashPalindromic centers
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)
📉
Lecture 28
Monotonic Patterns
Next Greater, Largest Rectangle, Sliding Window Max
4 days 15 Q
Key Patterns
Next Greater ElementMonotonic Stack Contribution techniqueSliding window max
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)
🛠️
Lecture 29
Design Data Structures
LRU, LFU, SkipList, Double Ended Queue from scratch
4 days 10 Q
Key Patterns
Composite designDLL + HashMap Frequency listsAmortized analysis
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
🎓
Lecture 30
Mock Interviews & Final Prep
FAANG-ready revision, speed coding, behaviorals
7 days Mixed
UMPIRE Framework
UnderstandMatch PlanImplement ReviewEvaluate
Sub-topics
  • Timed mock rounds (45 mins)
  • Communication & thinking out loud
  • Behavioral prep (STAR method)
  • Identifying patterns in 60 seconds