DSA Preparation Roadmap
Not sure which topic to tackle next? Follow this 4-phase preparation order across all 21 core DSA topics, complete prerequisites first, and jump directly into each curated question directory.
Overall Roadmap Progress
Follow phases 1 through 4 in order so prerequisite patterns build naturally.
0% coding questions solved
Phase 1: Linear Foundations & Lookup Patterns
Build fluency in array indexing, string manipulation, cumulative sums, pointer sweeps, and constant-time hashing before moving to recursive structures.
Arrays
Start with Easy array scans and in-place partitioning before attempting Kadane's and matrix rotation questions.
Strings
Practice anagram counting and palindrome checks first, then move on to string parsing and substring boundaries.
Prefix Sum
Master 1D running sums and pivot indices before combining prefix sums with hash maps for target-sum subarrays.
Two Pointers
Practice sorted pair searches first, then progress to 3Sum deduplication and Trapping Rain Water.
Sliding Window
Begin with fixed-size K window sums, then advance to variable-size substring and minimum window problems.
Phase 2: Searching, Sorting, Recursion & Linear ADTs
Master logarithmic search spaces, divide-and-conquer sorting, recursive call stacks, linked pointer chains, and LIFO/FIFO structures.
Sorting
Review Merge Sort and Quick Sort mechanics first, then practice interval overlaps and inversion counting.
Binary Search
Lock down lower/upper bound templates before tackling rotated arrays and monotonic answer-space problems.
Recursion
Build intuition with power exponentiation and Fibonacci trees before moving into multi-branch backtracking.
Linked Lists
Practice iterative reversal and cycle detection first, then tackle intersections and k-way list merging.
Stacks
Start with balanced parentheses and Min Stack, then master monotonic decreasing/increasing stack patterns.
Phase 3: Backtracking, Trees, Heaps & Greedy
Transition into recursive state exploration, hierarchical binary trees, priority queues, and greedy optimality proofs.
Backtracking
Master subsets and permutations templates first, then tackle grid search, N-Queens, and Sudoku Solver.
Binary Trees
Practice height and level-order traversal first, then move to diameter, views, LCA, and tree serialization.
Binary Search Trees
Use inorder traversal properties to validate BSTs and find kth smallest elements before BST LCA.
Heaps
Solve kth largest/smallest and top-k frequent items first, then combine min/max heaps for streaming median.
Greedy Algorithms
Practice sorting-backed interval scheduling and fractional knapsack before jump and gas station problems.
Bit Manipulation
Learn XOR properties and bit-mask checks on Easy problems before combining bitmasks with subset generation.
Phase 4: Tries, Graphs & Dynamic Programming
Tackle prefix trees, network traversal/shortest paths, and overlapping-subproblem optimization.
Tries
Implement insert/search/delete from scratch first, then pair tries with DFS for Word Search II.
Graphs
Solidify BFS, DFS, and cycle detection before moving to topological ordering, bipartite checks, and Dijkstra.
Dynamic Programming
Progress from 1D Climbing Stairs & House Robber to Knapsack/Coin Change, then 2D LCS and Edit Distance.