DSA-Gen

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.

21-Topic Preparation Sequence

Overall Roadmap Progress

Follow phases 1 through 4 in order so prerequisite patterns build naturally.

0 / 214

0% coding questions solved

Stage 1

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.

0/62 solved (0%)
Step 1
0/21 solved

Arrays

Start with Easy array scans and in-place partitioning before attempting Kadane's and matrix rotation questions.

Subarray traversalIn-place swapsMatrix boundaries
Step 2
0/14 solved

Strings

Practice anagram counting and palindrome checks first, then move on to string parsing and substring boundaries.

Prerequisites:Arrays
Frequency mapsPalindromesParsing edge cases
Step 3
0/6 solved

Prefix Sum

Master 1D running sums and pivot indices before combining prefix sums with hash maps for target-sum subarrays.

Prerequisites:Arrays
Cumulative arraysRange queriesPrefix + HashMap
Step 4
0/7 solved

Two Pointers

Practice sorted pair searches first, then progress to 3Sum deduplication and Trapping Rain Water.

Prerequisites:ArraysStrings
Converging pointersSorted pairsIn-place merge
Step 5
0/7 solved

Sliding Window

Begin with fixed-size K window sums, then advance to variable-size substring and minimum window problems.

Fixed-size windowsVariable shrink/expandFrequency tracking
Step 6
0/7 solved

Hashing

Solve duplicate and zero-sum lookups first, then combine hash maps with doubly linked lists in LRU Cache.

Prerequisites:ArraysStrings
O(1) membershipSequence groupingCache design
Stage 2

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.

0/52 solved (0%)
Step 7
0/10 solved

Sorting

Review Merge Sort and Quick Sort mechanics first, then practice interval overlaps and inversion counting.

Prerequisites:ArraysTwo Pointers
Divide & conquerInterval mergingCustom comparators
Step 8
0/11 solved

Binary Search

Lock down lower/upper bound templates before tackling rotated arrays and monotonic answer-space problems.

Prerequisites:ArraysSorting
Sorted boundsRotated arraysBinary search on answer
Step 9
0/6 solved

Recursion

Build intuition with power exponentiation and Fibonacci trees before moving into multi-branch backtracking.

Prerequisites:Arrays
Base casesDivide & conquerRecurrence trees
Step 10
0/10 solved

Linked Lists

Practice iterative reversal and cycle detection first, then tackle intersections and k-way list merging.

Prerequisites:Two PointersRecursion
In-place reversalFast/slow pointersDummy head nodes
Step 11
0/9 solved

Stacks

Start with balanced parentheses and Min Stack, then master monotonic decreasing/increasing stack patterns.

Prerequisites:ArraysLinked Lists
Bracket matchingMonotonic stacksHistogram spans
Step 12
0/6 solved

Queues

Implement queues with stacks and circular buffers first, then solve sliding window maximum with a deque.

Prerequisites:ArraysStacks
Circular buffersMonotonic dequeSimulation
Stage 3

Phase 3: Backtracking, Trees, Heaps & Greedy

Transition into recursive state exploration, hierarchical binary trees, priority queues, and greedy optimality proofs.

0/58 solved (0%)
Step 13
0/10 solved

Backtracking

Master subsets and permutations templates first, then tackle grid search, N-Queens, and Sudoku Solver.

Prerequisites:Recursion
Subsets & permutationsGrid path searchConstraint pruning
Step 14
0/16 solved

Binary Trees

Practice height and level-order traversal first, then move to diameter, views, LCA, and tree serialization.

Prerequisites:RecursionQueues
DFS/BFS traversalsTree viewsLowest common ancestor
Step 15
0/6 solved

Binary Search Trees

Use inorder traversal properties to validate BSTs and find kth smallest elements before BST LCA.

Inorder monotonicityRange validationKth order element
Step 16
0/8 solved

Heaps

Solve kth largest/smallest and top-k frequent items first, then combine min/max heaps for streaming median.

Prerequisites:SortingBinary Trees
Top-K selectionK-way mergeTwo-heap median
Step 17
0/9 solved

Greedy Algorithms

Practice sorting-backed interval scheduling and fractional knapsack before jump and gas station problems.

Prerequisites:Sorting
Activity schedulingJump reachabilityInterval sorting
Step 18
0/9 solved

Bit Manipulation

Learn XOR properties and bit-mask checks on Easy problems before combining bitmasks with subset generation.

Prerequisites:Arrays
XOR cancellationSet bit countingBitmask subsets
Stage 4

Phase 4: Tries, Graphs & Dynamic Programming

Tackle prefix trees, network traversal/shortest paths, and overlapping-subproblem optimization.

0/42 solved (0%)
Step 19
0/6 solved

Tries

Implement insert/search/delete from scratch first, then pair tries with DFS for Word Search II.

Prerequisites:StringsBinary Trees
Prefix insertionWildcard DFSAutocomplete lookup
Step 20
0/19 solved

Graphs

Solidify BFS, DFS, and cycle detection before moving to topological ordering, bipartite checks, and Dijkstra.

Prerequisites:QueuesRecursionHeaps
BFS/DFS islandsTopological sortDijkstra & MST
Step 21
0/17 solved

Dynamic Programming

Progress from 1D Climbing Stairs & House Robber to Knapsack/Coin Change, then 2D LCS and Edit Distance.

Prerequisites:RecursionBacktracking
1D state transitions0/1 & unbounded knapsack2D string DP