All Roadmaps

DSA Interview Prep

A pattern-first path through coding interviews: the techniques that recur, the structures behind them, and the loop they sit inside.

42h total·6 sections·34 topics
Filter:
Sort:

Make this roadmap your plan

Sign in to save your routine, streaks, notes, and progress across devices.

0 of 34 topics completed(est. 42h remaining)
0%
1

Groundwork

The habits and vocabulary every later pattern assumes you already have.

3h 15m0/4
0%

Talking about complexity out loud

beginner1h

State and defend a time and space bound before you write code. Amortised analysis, the difference between worst and expected case, and why "O(n log n) because I sort" is a complete answer.

Subtopics (0/4)
Worst vs expected case
Amortised analysis
Space you forgot to count
Stating a bound before coding
Big-O Cheat SheetCLRS chapter 3 — Growth of FunctionsAmortized analysis, worked

Reading the problem before solving it

beginner45m

Restating the problem, extracting the constraints, and choosing a brute force you can actually explain. Most failed interviews are lost in the first four minutes.

Subtopics (0/4)
Restating the ask
Reading constraints as hints
Brute force first
Naming the invariant
How to solve it — PolyaConstraints tell you the algorithmUntimed practice set

Edge cases and off-by-one

beginner45m

Empty input, one element, all-equal, integer overflow, and the boundary you always get wrong. A checklist you run before saying you are done.

Subtopics (0/4)
Empty and single-element
Duplicates
Overflow
Boundary indices
Off-by-one errors, cataloguedProperty-based testing introEdge case drills

Dry-running code on paper

beginner45m

Tracing your own solution against an example without executing it, which is the only debugging tool you have in an interview.

Subtopics (0/3)
Trace tables
Invariant checking
Spotting the first divergence
Tracing loops by handRubber duck debuggingVisualise algorithms
2

Linear patterns

The array and string techniques that account for a third of every interview loop.

8h 15m0/6
0%

Two pointers

beginner1h 30m

Opposite ends, same direction, and fast/slow. Recognising when a sorted input lets you drop a nested loop.

Subtopics (0/4)
Opposite ends
Same direction
Fast and slow
Partitioning in place

Sliding window

beginner1h 30m

Fixed and variable windows, and the "shrink while invalid" loop shape that makes variable windows one template rather than ten problems.

Subtopics (0/4)
Fixed window
Variable window
Shrink-while-invalid
Counting with a frequency map

Prefix sums and difference arrays

beginner1h 15m

Turning repeated range queries into O(1) lookups, and the prefix-sum-plus-hashmap trick behind subarray-sum problems.

Subtopics (0/4)
1D prefix sums
2D prefix sums
Difference arrays
Prefix sum with a hash map

Hash maps and frequency counting

beginner1h 15m

Grouping, deduplication, and the seen-set. Where a hash map turns quadratic into linear and where it quietly does not.

Subtopics (0/4)
Seen sets
Frequency maps
Grouping by key
Collision costs

Sorting as a preprocessing step

intermediate1h 15m

When paying n log n up front collapses the rest of the problem, plus custom comparators and stability.

Subtopics (0/4)
Custom comparators
Stability
Counting sort
Sort-then-scan
Comparison sorts comparedMerge IntervalsSorting algorithms visualised
3

Structures under pressure

The data structures interviewers reach for, and the signals that tell you which one is wanted.

9h 30m0/8
0%

Stacks and the monotonic stack

intermediate1h 15m

Matching, evaluation, and the next-greater-element family. Recognising a monotonic stack from the phrase "next larger".

Subtopics (0/4)
Bracket matching
Next greater element
Histogram problems
Stack-based parsing

Queues, deques and monotonic deques

intermediate1h

BFS queues, circular buffers, and the sliding-window-maximum deque.

Subtopics (0/3)
Circular buffers
Monotonic deque
BFS frontiers

Linked lists without losing a pointer

intermediate1h 15m

Reversal, cycle detection, merge, and the dummy-head idiom that removes half the special cases.

Subtopics (0/4)
Dummy head
In-place reversal
Floyd's cycle detection
Merging sorted lists

Heaps and top-k

intermediate1h 15m

When a heap beats a sort, k-th largest, merging k lists, and the two-heap running-median trick.

Subtopics (0/4)
Min and max heaps
Top-k
Merging k lists
Two-heap median

Binary trees and traversal

intermediate1h 30m

Recursive and iterative traversals, level order, and the "return something from each subtree" recursion shape.

Subtopics (0/4)
Pre/in/post order
Level order
Bottom-up recursion
Path problems

Binary search trees

intermediate1h 15m

The BST invariant, in-order as a sorted walk, insertion and deletion, and why a degenerate BST is a linked list.

Subtopics (0/4)
The BST invariant
In-order walks
Insert and delete
Balance and degeneracy

Tries

intermediate1h

Prefix trees for autocomplete and word search, and the space trade you are making against a hash set.

Subtopics (0/4)
Node layout
Prefix queries
Trie plus DFS
Memory trade-offs
Trie data structureImplement TrieWord Search II

Union-find

intermediate1h

Disjoint sets with path compression and union by rank — the structure that turns connectivity questions into near-constant time.

Subtopics (0/4)
Path compression
Union by rank
Cycle detection
Connected components
4

Graphs

Modelling first, algorithm second — most graph interviews are lost at the modelling step.

6h 15m0/5
0%

Recognising a graph problem

intermediate1h

Turning a grid, a word list or a dependency description into nodes and edges, and choosing a representation.

Subtopics (0/4)
Adjacency list vs matrix
Implicit graphs
Grids as graphs
State-space search
Graph representationsNumber of IslandsWord Ladder

BFS and DFS

intermediate1h 30m

Shortest path in an unweighted graph, connected components, and the visited-set discipline that stops infinite loops.

Subtopics (0/4)
Visited sets
Multi-source BFS
Recursive vs iterative DFS
Component counting
BFS and DFS comparedRotting OrangesClone Graph

Topological sort and cycle detection

intermediate1h 15m

Kahn's algorithm and DFS colouring, and reading "can this schedule be satisfied?" as a cycle question.

Subtopics (0/4)
Kahn's algorithm
DFS three-colouring
Dependency ordering
Detecting cycles

Weighted shortest paths

advanced1h 30m

Dijkstra with a priority queue, Bellman-Ford when edges can be negative, and why Dijkstra breaks on them.

Subtopics (0/4)
Dijkstra
Bellman-Ford
Negative edges
Path reconstruction

Minimum spanning trees

advanced1h

Kruskal on top of union-find, Prim on top of a heap, and the problems that are secretly asking for an MST.

Subtopics (0/4)
Kruskal
Prim
Cut property
MST in disguise
MST algorithmsMin Cost to Connect All PointsKruskal vs Prim
5

Recursion and dynamic programming

The section people skip and then fail on. Built bottom-up from plain recursion.

8h 45m0/6
0%

Recursion and backtracking

intermediate1h 30m

Choose, explore, un-choose. Permutations, subsets, and combination sums, plus pruning that turns exponential into tractable.

Subtopics (0/4)
Choose-explore-unchoose
Subsets and permutations
Pruning
Combination sums
Backtracking templateSubsetsN-Queens

Memoisation: recursion that stops repeating itself

intermediate1h 15m

Adding a cache to a recursive solution and reading the state you cached as the DP state. The bridge between recursion and DP.

Subtopics (0/4)
Identifying the state
Cache keys
Overlapping subproblems
Top-down vs bottom-up

1D dynamic programming

intermediate1h 30m

Linear DP over an array: Fibonacci-shaped recurrences, longest increasing subsequence, and rolling the table down to O(1) space.

Subtopics (0/4)
Linear recurrences
LIS
Space rolling
Reconstructing the answer

2D dynamic programming

advanced1h 45m

Grid paths, edit distance, and the two-sequence table. Drawing the table before writing the loop.

Subtopics (0/4)
Grid DP
Two-sequence tables
Edit distance
Table reconstruction

Knapsack and its disguises

advanced1h 30m

0/1 and unbounded knapsack, subset sum, coin change — one recurrence wearing four different problem statements.

Subtopics (0/4)
0/1 knapsack
Unbounded knapsack
Subset sum
Counting vs optimising

Greedy, and proving it works

advanced1h 15m

Interval scheduling, jump games, and the exchange argument that separates a correct greedy from a plausible one.

Subtopics (0/4)
Exchange arguments
Interval scheduling
When greedy fails
Greedy vs DP
Greedy algorithms and proofsJump Game IINon-overlapping Intervals
6

The interview loop itself

Everything between solving the problem and getting the offer.

6h0/5
0%

Thinking out loud

beginner45m

Narrating your approach, stating trade-offs, and asking clarifying questions that are actually useful. Silence reads as being stuck.

Subtopics (0/3)
Clarifying questions
Narrating trade-offs
Recovering from a wrong turn
Cracking the Coding InterviewHow to think out loudMock interview walkthrough

Timed mock interviews

intermediate2h

Practising under a clock with someone watching. The single highest-yield activity in this roadmap, and the one most people skip.

Subtopics (0/3)
45-minute pacing
Working with a partner
Post-mortems
Prampinterviewing.ioStructuring a 45-minute round

Object-oriented design rounds

intermediate1h 30m

Designing a parking lot, an elevator or a deck of cards: classes, responsibilities, and the interfaces you would actually implement.

Subtopics (0/3)
Responsibility assignment
Interfaces over inheritance
Common design prompts
Design patterns, plainlyOO design interview questionsSOLID in practice

Behavioural rounds

beginner1h

STAR-structured stories with real numbers, and having four of them ready rather than inventing one under pressure.

Subtopics (0/4)
STAR structure
Quantifying impact
Conflict stories
Questions to ask back
The STAR methodWriting your brag documentBehavioural question bank

Offers and negotiation

intermediate45m

Reading a compensation package, comparing offers honestly, and negotiating without burning the relationship.

Subtopics (0/4)
Reading an offer
Base vs equity
Competing offers
Timing
Ten rules for negotiating a job offerLevels.fyiEquity, explained
DSA Interview Prep | AlgoDrill