DSA Roadmap
A structured order for learning Data Structures and Algorithms for placements and coding interviews.
Follow the sequence
Thirteen steps, from fundamentals to revision. Move on once you can solve basic problems in a topic without looking up the solution.
-
Programming fundamentals
Choose one language (C++, Java or Python) and get comfortable with variables, loops, functions and input/output.
- Syntax and control flow
- Functions and basic I/O
- Writing and debugging small programs
-
Time and space complexity
Learn Big-O notation so you can compare solutions before you code them.
- Common growth rates
- Analysing loops and recursion
- Space trade-offs
-
Arrays and strings
The most frequent starting point in coding rounds.
- Traversal and two pointers
- Prefix sums and sliding window
- String manipulation
-
Searching and sorting
Know the standard algorithms and when each one fits.
- Linear and binary search
- Bubble, merge and quick sort
- Using built-in sort correctly
-
Linked lists
Pointer-based structures and how to reason about them.
- Singly and doubly linked lists
- Reversal and cycle detection
- Fast and slow pointers
-
Stacks and queues
Order-based structures with many classic problems.
- Stack and queue operations
- Monotonic stack idea
- Deque basics
-
Binary trees and BSTs
Hierarchical data and recursion on trees.
- Traversals
- Height, diameter and ancestors
- BST search, insert and delete
-
Heaps and hash tables
Priority handling and fast lookups.
- Min/max heap and priority queue
- Hash maps and sets
- Frequency counting
-
Graphs
Model connections and paths between items.
- Representations
- BFS and DFS
- Shortest path and topological ordering
-
Recursion and backtracking
Break problems into smaller ones and explore choices.
- Recursive thinking
- Subsets and permutations
- Pruning
-
Greedy algorithms
Locally best choices that lead to a valid global answer.
- Interval and scheduling problems
- When greedy fails
- Proof by exchange idea
-
Dynamic programming
Reuse solutions to overlapping subproblems.
- Memoization and tabulation
- 1D and 2D states
- Classic patterns such as knapsack
-
Practice and revision
Turn knowledge into speed and accuracy.
- Topic-wise problem sets
- Timed practice
- Revision notes and error log
Ready for interviews?
Once the first few steps feel comfortable, start practising how interviews are run.
Go to Interview Preparation