DSA Roadmap for Placements (12 Weeks)
A 12-week data structures and algorithms plan for campus placements and coding interviews - patterns in the right order, classic problems, and a weekly routine.
Your progress below is saved in this browser. Sign up free to keep it on every device.
Coding rounds reward recognising patterns, not memorising hundreds of problems. This plan teaches the patterns in the order they build on each other, then practises them on the problems interviewers actually ask. It assumes you already know one language (Java or Python) and can spend about 2 hours a day.
Weekly routine: learn one pattern from the lessons, solve 4–6 problems on it, and on the weekend re-solve two problems you got wrong without looking at the answer.
Weeks 1–2: Foundations#
Big O, arrays and strings, hashing, then the first two-pointer and sliding-window problems. These patterns alone solve a large share of easy and medium questions.
Problems to solve: Two Sum, Contains Duplicate, Valid Anagram, Valid Palindrome, Best Time to Buy and Sell Stock, Longest Substring Without Repeating Characters.
Weeks 3–4: Searching, sorting and prefix sums#
Binary search (including searching on the answer), merge sort and quick sort, prefix sums and Kadane’s algorithm.
Problems to solve: Binary Search, Search in Rotated Sorted Array, Koko Eating Bananas, Subarray Sum Equals K, Maximum Subarray.
Weeks 5–6: Recursion, stacks and linked lists#
Recursion and backtracking, stacks and the monotonic stack, queues, linked lists and fast and slow pointers.
Problems to solve: Subsets, Valid Parentheses, Min Stack, Daily Temperatures, Reverse Linked List, Merge Two Sorted Lists, Linked List Cycle.
Weeks 7–8: Trees and heaps#
Binary trees and their traversals, binary search trees, heaps and priority queues.
Problems to solve: Maximum Depth of Binary Tree, Invert Binary Tree, Level Order Traversal, Validate BST, Lowest Common Ancestor, Kth Largest Element, Merge k Sorted Lists.
Weeks 9–10: Graphs#
BFS and DFS, grid problems, topological sort and Dijkstra’s shortest path.
Problems to solve: Number of Islands, Rotting Oranges, Course Schedule, Network Delay Time, Word Ladder.
Weeks 11–12: Dynamic programming, greedy and mock interviews#
1D and 2D dynamic programming, greedy algorithms and intervals, then full mock interviews: 45 minutes, one medium problem, explaining your approach out loud.
Before each interview#
Read the DSA Interview Playbook lesson, take the DSA and Coding Interview mock tests, and re-solve the problems you marked as hard. Revising what you got wrong is worth more than new problems in the last week.
Get new lessons in your inbox
One email when we publish a new tutorial or guide. No spam, unsubscribe in one click.