##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Explore individual topics with detailed lessons and practice problems.
Hash maps and frequency counting. You'll solve problems that transform O(n²) brute force into O(n) using hash tables.
Moving pointers to avoid nested loops. You'll transform O(n²) solutions into O(n) using the two-pointer technique.
What to expect in MAANG coding interviews. You'll learn the format, expectations, and how to approach each problem type.
What this roadmap covers
What happens in a coding interview
The evaluation criteria
How to recognize problem types
Your study plan
What you learned
Hash maps and frequency counting. You'll solve problems that transform O(n²) brute force into O(n) using hash tables.
Why arrays and hashing matter
The classic interview problem
The main idea
The algorithm
The code
Code it yourself
Interview context
Finding repeated elements
The main idea
The algorithm
The code
Code it yourself
Interview context
Grouping with hash maps
The main idea
The algorithm
The code
Code it yourself
Interview context
Building prefix sums
The main idea
The algorithm
The code
Code it yourself
Interview context
Prefix and suffix products
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
Moving pointers to avoid nested loops. You'll transform O(n²) solutions into O(n) using the two-pointer technique.
The two-pointer technique
Two pointers on sorted array
The main idea
The algorithm
The code
Code it yourself
Interview context
Finding triplets
The main idea
The algorithm
The code
Code it yourself
Interview context
The classic sliding window
The main idea
The algorithm
The code
Code it yourself
Interview context
Two pointers for max area
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
Pointer manipulation and list operations. You'll learn reversal, fast/slow pointers, and merging techniques.
Why linked lists matter
The core list operation
The main idea
The algorithm
The code
Code it yourself
Interview context
Fast and slow pointers
The main idea
The algorithm
The code
Code it yourself
Interview context
Merging two lists
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
Last-in-first-out processing for parsing and next greater elements. You'll learn matching and monotonic stack patterns.
When to use stacks
The classic stack problem
The main idea
The algorithm
The code
Code it yourself
Interview context
Stack with O(1) minimum
The main idea
The algorithm
The code
Code it yourself
Interview context
Introduction to monotonic stack
The main idea
The algorithm
The code
Code it yourself
Interview context
Monotonic stack pattern
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
Tree traversal and BST properties. You'll learn recursive tree algorithms and ordered tree operations.
Tree basics
Basic tree recursion
The main idea
The algorithm
The code
Code it yourself
Interview context
BST property verification
The main idea
The algorithm
The code
Code it yourself
Interview context
Using BST properties
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
BFS, DFS, and connected components. You'll learn to traverse graphs and detect cycles.
Graph basics
Counting connected components
The main idea
The algorithm
The code
Code it yourself
Interview context
Deep copying a graph
The main idea
The algorithm
The code
Code it yourself
Interview context
Cycle detection in directed graphs
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
Cutting the search space in half. You'll learn classic binary search and its variations for rotated arrays.
When to use binary search
The classic algorithm
The main idea
The algorithm
The code
Code it yourself
Interview context
Binary search with a twist
The main idea
The algorithm
The code
Code it yourself
Interview context
Finding the pivot point
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
Efficient access to min/max elements. You'll learn Top K problems and streaming algorithms.
When to use heaps
The classic heap problem
The main idea
The algorithm
The code
Code it yourself
Interview context
Maintaining top K with a heap
The main idea
The algorithm
The code
Code it yourself
Interview context
Two heaps pattern
The main idea
The algorithm
The code
Code it yourself
Interview context
Heap for k-way merge
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
Breaking problems into overlapping subproblems. You'll learn memoization, tabulation, and common DP patterns.
Why dynamic programming matters
The simplest DP problem
The main idea
The algorithm
The code
Code it yourself
Interview context
DP with constraints
The main idea
The algorithm
The code
Code it yourself
Interview context
Unbounded knapsack pattern
The main idea
The algorithm
The code
Code it yourself
Interview context
The LIS pattern
The main idea
The algorithm
The code
Code it yourself
Interview context
2D grid DP
The main idea
The algorithm
The code
Code it yourself
Interview context
DP on two strings
The main idea
The algorithm
The code
Code it yourself
Interview context
String segmentation DP
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned
Controlled exploration of all possibilities. You'll learn to generate combinations, permutations, and solve constraint satisfaction problems.
What backtracking solves
The backtracking foundation
The main idea
The algorithm
The code
Code it yourself
Interview context
All orderings of elements
The main idea
The algorithm
The code
Code it yourself
Interview context
Combinations with reuse
The main idea
The algorithm
The code
Code it yourself
Interview context
Constraint-based backtracking
The main idea
The algorithm
The code
Code it yourself
Interview context
Grid backtracking
The main idea
The algorithm
The code
Code it yourself
Interview context
What you learned