DSA Roadmap for Placements: What Matters in 2026
Practical DSA roadmap for campus placements in India: topic priorities, platform choices, company patterns, and time management.

The DSA Anxiety Problem
I'll be honest. When placement season was six months away and I'd barely solved 30 problems on any platform, I couldn't sleep. Literally. I'd lie awake at 2 AM scrolling through LinkedIn posts where people my age were bragging about 500+ LeetCode solves, FAANG internship conversions, and Rs 40 LPA fresher packages. My college WhatsApp groups were flooded with "bro which DSA sheet should I follow" and "is Striver's A2Z enough for TCS NQT." Panic was everywhere. And that panic was doing more damage than any lack of preparation.
I'm not exaggerating when I say the anxiety nearly paralyzed me. For about three weeks, I bounced between YouTube tutorials, opened ten different problem lists, solved nothing completely, and felt worse every day. Maybe you're in that exact spot right now. If you are, take a breath. I've been through this process myself and have since mentored over 50 students through placement preparation. Here's what I've learned, and I think it'll change how you approach the whole thing: most students over-prepare on topics that rarely come up and under-prepare on topics that appear in every single interview.
The gap between what YouTube courses teach and what interviewers actually ask? Wider than you'd expect. Way wider.
So no — this isn't going to be another generic "learn arrays, then learn trees, then learn graphs" list. What I want to give you is an honest assessment of what companies in India actually test, how to prioritize your limited time, and the mistakes that cost students offers they should've had.
Reality Check: What Companies Actually Ask
Before you start grinding problems, understand what the test even looks like. Indian placement interviews fall into two broad categories, and the DSA expectations are wildly different between them.
Service Companies (TCS, Infosys, Wipro, Cognizant, Accenture)
Bulk hiring. Thousands of students per cycle. Their online assessments are standardized and focus on:
- Basic arrays and strings — sorting, searching, pattern matching
- Simple math — GCD, LCM, prime numbers, factorial, Fibonacci
- Basic data structures — stacks, queues, linked lists (implementation, not problem-solving)
- SQL queries — joins, group by, subqueries
- Pseudocode interpretation — reading and tracing code logic
Bar isn't high for DSA here. If you can solve easy-to-medium problems on any platform, you'll clear these rounds without too much trouble. Real differentiator for service company placements is usually the aptitude round (verbal, logical, quantitative) and communication skills during the interview. Lots of students underestimate that part and it costs them.
Product Companies (Google, Microsoft, Amazon, Flipkart, PhonePe, Razorpay, etc.)
Fundamentally different hiring bar. Their interviews test:
- Problem-solving ability — can you break down an unfamiliar problem?
- Best possible solutions — brute force gets you partial credit at best
- Code quality — clean, bug-free code written under pressure
- Communication — explaining your thought process clearly while you work
Topics they test overlap heavily across companies. After analyzing hundreds of interview questions from Indian placement drives, here's the frequency distribution. Study it carefully, because this should drive your entire preparation strategy:
| Topic | Frequency in Interviews | Priority |
|---|---|---|
| Arrays / Strings | Very High | Must Learn |
| Hashing (HashMaps/Sets) | Very High | Must Learn |
| Two Pointers / Sliding Window | High | Must Learn |
| Binary Search | High | Must Learn |
| Stacks / Queues | High | Must Learn |
| Linked Lists | Medium-High | Must Learn |
| Trees (Binary Trees, BST) | High | Must Learn |
| Graphs (BFS, DFS) | Medium | Should Learn |
| Dynamic Programming | Medium-High | Should Learn |
| Recursion / Backtracking | Medium | Should Learn |
| Heaps / Priority Queues | Medium | Should Learn |
| Tries | Low-Medium | Nice to Have |
| Segment Trees / BIT | Low | Skip for most |
| Advanced Graph (Dijkstra, etc.) | Low | Nice to Have |
See how Segment Trees and advanced graph algorithms are at the bottom? I suspect 90% of students who study those topics during placement prep never see them in an actual interview. Meanwhile, hashing and two pointers show up everywhere and some students barely practice them. Priorities matter.
The Topic Priority Order (And Why It Matters)
Here's the order I recommend, and the reasoning behind each stage. Each builds on the previous one, so don't skip ahead. Seriously. Don't.
Stage 1: Arrays and Strings (2-3 weeks)
Foundation of everything. Over 40% of placement coding questions involve arrays or strings in some form. If you're weak here, nothing else matters. Not trees. Not graphs. Not DP. Arrays and strings first.
Key patterns to master:
- Prefix sums — subarray sum queries in O(1)
- Kadane's algorithm — maximum subarray sum
- Dutch National Flag — sort an array with three distinct values
- Matrix traversal — row-wise, column-wise, spiral, diagonal
- String manipulation — palindrome checks, anagram grouping, substring search
# Kadane's Algorithm — Maximum Subarray Sum
def max_subarray_sum(nums):
max_sum = nums[0]
current_sum = nums[0]
for i in range(1, len(nums)):
current_sum = max(nums[i], current_sum + nums[i])
max_sum = max(max_sum, current_sum)
return max_sum
Target: Solve 40-50 array/string problems across easy and medium difficulty. Don't rush through them. Understand each pattern deeply enough to explain it to someone else.
Stage 2: Hashing (1-2 weeks)
HashMaps and HashSets are probably the most underrated tools in interview prep. A shocking number of "hard" problems become trivial when you think in terms of hash lookups. I've watched students struggle with brute force approaches for 20 minutes, then solve the same problem in 5 minutes once they considered a HashMap.
Key patterns:
- Frequency counting — character/element frequency maps
- Two Sum pattern — find pairs with a given sum
- Group By — group anagrams, group by property
- Subarray with given sum — using prefix sum + hash map
# Two Sum using HashMap — O(n) time, O(n) space
def two_sum(nums, target):
seen = {}
for i, num in enumerate(nums):
complement = target - num
if complement in seen:
return [seen[complement], i]
seen[num] = i
return []
Target: Solve 20-25 hashing problems. Goes fast because the concept is straightforward. Biggest challenge isn't understanding hashing — it's recognizing when a problem calls for it.
Stage 3: Two Pointers and Sliding Window (2 weeks)
These two techniques come up in interviews constantly. They're also the techniques where the jump from brute force (O(n^2)) to an answer that runs in O(n) is most dramatic. Interviewers love watching candidates make that leap.
Two Pointer patterns:
- Opposite direction — two pointers from start and end (container with most water, valid palindrome)
- Same direction — slow and fast pointers (remove duplicates, linked list cycle detection)
- Three pointers — three sum, sort colors
Sliding Window patterns:
- Fixed size window — maximum sum subarray of size k
- Variable size window — smallest subarray with sum >= target
- Window with HashMap — longest substring without repeating characters
# Longest Substring Without Repeating Characters
def length_of_longest_substring(s):
char_index = {}
max_length = 0
start = 0
for end in range(len(s)):
if s[end] in char_index and char_index[s[end]] >= start:
start = char_index[s[end]] + 1
char_index[s[end]] = end
max_length = max(max_length, end - start + 1)
return max_length
Target: 25-30 problems. Master the templates and — more importantly — learn to recognize when to apply them. Pattern recognition is the real skill here.
Stage 4: Binary Search (1-2 weeks)
Binary search isn't just "find an element in a sorted array." It's a problem-solving framework that applies to a surprising range of problems — searching in rotated arrays, finding peak elements, binary search on answer (minimizing maximum, kth smallest), and more. Once you internalize this, you'll start seeing binary search opportunities everywhere.
Key variations:
- Standard binary search on sorted arrays
- Lower bound / Upper bound — first and last occurrence
- Search in rotated sorted array
- Binary search on answer — aggressive cows, book allocation, painters partition
# Binary Search on Answer — Minimum capacity to ship packages in D days
def ship_within_days(weights, days):
left, right = max(weights), sum(weights)
while left < right:
mid = (left + right) // 2
needed_days = 1
current_load = 0
for w in weights:
if current_load + w > mid:
needed_days += 1
current_load = 0
current_load += w
if needed_days <= days:
right = mid
else:
left = mid + 1
return left
Target: 20-25 problems. Focus especially on "binary search on answer" problems — they're interview favorites and most students don't practice them enough. I think they might be the highest-value category in all of DSA prep.
Stage 5: Stacks, Queues, and Linked Lists (2 weeks)
Stacks and queues are straightforward data structures but lead to elegant solutions for bracket matching, monotonic stack problems (next greater element, largest rectangle in histogram), and queue-based BFS.
Linked lists get tested less frequently than five years ago, but you still need to know the basics: reversal, cycle detection, merge two sorted lists, and finding the middle element. Skip the exotic linked list problems. Not worth your time.
Target: 30-35 problems across all three.
Stage 6: Trees (2-3 weeks)
Binary trees and BSTs are interview staples. Almost every product company interview includes at least one tree problem. Sometimes two. Missing this category isn't an option.
Must-know patterns:
- Traversals — inorder, preorder, postorder (both recursive and iterative)
- Level order traversal (BFS)
- Height / Depth calculations
- LCA (Lowest Common Ancestor)
- View problems — left view, right view, top view, bottom view
- BST operations — search, insert, delete, validate BST
# Lowest Common Ancestor of a Binary Tree
def lowest_common_ancestor(root, p, q):
if not root or root == p or root == q:
return root
left = lowest_common_ancestor(root.left, p, q)
right = lowest_common_ancestor(root.right, p, q)
if left and right:
return root
return left if left else right
Target: 30-40 problems. Trees have a lot of variety, so spend adequate time here. Don't skip iterative traversals — interviewers sometimes specifically ask for the non-recursive version.
Stage 7: Graphs (2 weeks)
Graph problems scare students. I get it. But here's the reassuring truth: the core techniques you actually need are limited. Way more limited than textbooks make them seem.
- BFS — shortest path in unweighted graphs, level-order processing
- DFS — connected components, cycle detection, topological sort
- Union-Find — connected components, redundant connections
Most placement interviews stick to BFS and DFS applications. Advanced algorithms like Dijkstra and Bellman-Ford rarely appear unless you're interviewing at Google or a competitive programming-heavy company. Don't spend three weeks on graph theory when two weeks of BFS/DFS mastery will cover 90% of what you'll face.
Target: 20-25 problems focusing on BFS, DFS, and their applications.
Stage 8: Dynamic Programming (3-4 weeks)
DP is the topic students fear most. Understandably so — it requires a different way of thinking than everything else. But here's what I tell every student I mentor: most DP problems in placements fall into a handful of categories. Learn the categories, and the individual problems start to click:
- 1D DP — climbing stairs, house robber, coin change
- 2D DP — longest common subsequence, edit distance, grid paths
- Knapsack variants — 0/1 knapsack, unbounded knapsack, subset sum
- DP on strings — palindromic substrings, longest palindromic subsequence
- DP on intervals — matrix chain multiplication, burst balloons
You don't need to solve 200 DP problems. Understand the categories, recognize the patterns, and solve 5-8 problems from each category. That's it. I think the students who try to brute-force their way through every DP problem on LeetCode end up more confused, not less.
Target: 40-50 problems across the categories above.
How Many Problems Should You Actually Solve?
Internet says 500+. Some people brag about 1000+. Here's the honest truth: quality beats quantity by a massive margin.
A student who solves 200 problems thoughtfully — understanding each pattern, writing clean code, and reviewing solutions they couldn't crack — will outperform someone who rushes through 500 problems copying solutions they half-understand. Every time. I've seen it happen over and over.
My recommended target: 200-300 well-understood problems over 4-5 months.
Breaks down to roughly 2-3 problems per day, which is sustainable alongside college coursework. Weekends, push to 4-5 problems per day. Rest days are important too. Your brain needs time to consolidate what you've learned.
Platform Comparison
| Platform | Best For | Indian Relevance | Cost |
|---|---|---|---|
| LeetCode | Product company prep, pattern recognition | Very High | Free (Premium: Rs 1,100/month) |
| Codeforces | Competitive programming, speed | Medium (for CP culture) | Free |
| GeeksforGeeks | Theory + practice, service company prep | Very High | Free (Courses: paid) |
| Coding Ninjas (Naukri) | Structured learning, company-specific questions | High | Paid (Rs 6,000-20,000) |
| InterviewBit | Focused interview prep | High | Free |
| HackerRank | Certifications, some companies use it for tests | Medium | Free |
My recommendation: Use LeetCode as your primary platform for problem-solving. Use GeeksforGeeks for theory and explanations when you're stuck on a concept. If you need structured guidance, Coding Ninjas (now under Naukri) or take U forward (Striver's resources, free on YouTube) are excellent.
LeetCode Premium is worth the investment if you're targeting specific companies. Company-wise question lists and frequency data save significant time. Not sure if Rs 1,100/month feels steep on a student budget — probably does — but it might be the highest-ROI money you spend all year.
Language Choice: C++ vs Java vs Python
Debate's been raging for years. Here's my practical take:
C++ — Fastest execution, which matters on platforms with tight time limits. STL (Standard Template Library) is powerful. Most competitive programming resources and editorials are in C++. However, syntax is verbose, and debugging is harder than it needs to be.
Java — Best for enterprise job interviews (service companies love Java). Rich standard library with excellent data structure support. More verbose than Python but safer in terms of type checking. Good choice if you're also targeting Java-based backend roles.
Python — Easiest syntax, fastest to write code in an interview setting. Built-in data structures (lists, dicts, sets) are incredibly convenient. Slower execution than C++ and Java, which occasionally causes TLE (Time Limit Exceeded) on some platforms. Annoying, but rare.
Regardless of which language you choose, understanding the most in-demand programming languages can help you align your DSA language choice with the roles you're targeting.
My recommendation for placement prep:
- Targeting product companies? Use C++ or Python. C++ if you want maximum control and speed, Python if you want to write less code under pressure. Both are perfectly valid.
- Targeting service companies? Use Java. Many service companies specifically ask for Java in their coding rounds, and knowing Java well feeds into backend developer roles these companies hire for.
- Not sure? Pick Python to start learning DSA (the concepts matter more than the language), then learn to implement the same solutions in C++ or Java as you get closer to placement season.
Don't switch languages mid-preparation. I can't stress this enough. Pick one, master its standard library for DSA, and stick with it until placements are over.
Common Mistakes in Contests and Interviews
After mentoring dozens of students, these are the patterns I see repeatedly. They're painful to watch because they're so avoidable.
1. Not Reading the Problem Fully
Cannot stress this enough. Students see a problem that "looks like" something they've done before and start coding immediately. Then they spend 20 minutes debugging before realizing the constraints were different or there was an edge case mentioned in the problem statement that they missed completely.
Fix: Read the problem twice. Minimum. Identify the input constraints (they hint at the expected time complexity). Walk through the examples by hand before writing a single line of code.
2. Jumping to Code Without a Plan
Best approach: understand problem, identify pattern, plan solution on paper (or in your head), then code. Most students skip steps 2 and 3 entirely. Seems like they feel pressure to start typing immediately.
Fix: Before writing any code, explain your approach out loud (or in your head) in 2-3 sentences. If you can't explain it clearly, you don't understand it well enough to code it. Simple test. Never fails.
3. Ignoring Edge Cases
Empty arrays. Single-element arrays. All elements being the same. Negative numbers. Integer overflow. These edge cases trip up students who test only with the given examples and call it done.
Fix: After coding, mentally test with: empty input, single element, all same elements, very large input, and negative values. Takes two minutes. Saves you from "wrong answer on test case 47."
4. Spending Too Long on One Problem
In an interview or timed test, spending 40 minutes on one problem while leaving two others unsolved is a terrible strategy. Terrible. You'd score better solving two easy problems than half-solving one hard one.
Fix: If you don't have a clear approach within 10 minutes, move on. Come back later if time permits. Partial solutions often earn partial credit — something is always better than nothing.
5. Not Practicing Under Time Pressure
Solving problems comfortably at home with no timer is a completely different experience from solving them in a 90-minute online assessment with your career on the line. Night and day difference.
Fix: Do weekly mock tests. LeetCode's Weekly and Biweekly contests are perfect for this. Participate in Codeforces Div 2/3 rounds. Simulate the pressure. Get used to it before the real thing.
How to Approach Unseen Problems
Every interview will throw at least one problem you've never seen before. That's the point — they're testing your problem-solving ability, not your memory. Accepting this fact makes it less scary.
Here's a framework that works:
-
Identify the input/output types. Array to number? String to string? Array to array? Narrows down possible approaches immediately.
-
Check the constraints. If n is at most 10^5, you need O(n log n) or better. If n is at most 20, brute force or backtracking works fine. If n is at most 10^3, O(n^2) is acceptable. Constraints are hints. Read them.
-
Try the brute force first. Even if it's too slow, writing out the brute force helps you understand the problem and often reveals optimization opportunities you wouldn't have seen otherwise.
-
Ask: can I sort the input? Sorting often simplifies problems dramatically and "only" costs O(n log n). Worth considering for almost any array problem.
-
Ask: can a HashMap help? If you're doing repeated lookups or counting, hashing reduces O(n) lookups to O(1). Probably the single most useful optimization technique.
-
Ask: does this have overlapping subproblems? If the same subproblem gets solved multiple times in your brute force, DP might apply. Recognize the recursion tree pattern.
-
Ask: is there a monotonic property I can binary search on? If "too small" and "too big" have a clear boundary, binary search on that boundary.
Company-Wise Patterns
Quick reference for what specific companies tend to ask. Take this with a grain of salt — patterns shift from year to year — but the general trends hold.
TCS Digital / NQT
- 1-2 coding questions (easy-medium)
- Focus on arrays, strings, basic math
- Time limit: generous (usually 2-3 hours for 2-3 questions)
- SQL question likely
Infosys SP / DSE
- 3 coding questions (easy to medium)
- Arrays, strings, sorting, basic recursion
- Pseudocode interpretation
- Aptitude section is weighted heavily — don't neglect it
Wipro Elite / Turbo
- 2 coding questions (easy)
- Very basic — simple loops, conditionals, patterns
- Heavy focus on aptitude and English
Amazon (SDE-1)
- 2 coding questions in OA (medium-hard)
- Trees, graphs, DP, sliding window, heap
- System design discussion (basic) in interviews
- Leadership principles in behavioral round — they take this seriously
Google (SWE Intern / L3)
- Graph problems, DP, greedy algorithms
- Emphasis on best-case solutions and clean code
- Multiple interview rounds, each with 1-2 problems
- Expect follow-up questions ("what if the input was a stream?")
Microsoft (SDE / SWE)
- Arrays, trees, linked lists, strings
- Medium difficulty, emphasis on code quality
- System design for experienced roles
- Behavioral round with situational questions
Flipkart / PhonePe
- Similar to Amazon in difficulty
- Machine coding round (build a small system in 90 minutes)
- Focus on OOP design and clean architecture
Time Management: A 5-Month Plan
| Month | Focus | Problems/Week | Activity |
|---|---|---|---|
| Month 1 | Arrays, Strings, Hashing | 15-20 | Foundation building |
| Month 2 | Two Pointers, Binary Search, Stacks/Queues | 15-20 | Pattern recognition |
| Month 3 | Trees, Linked Lists, Recursion | 15-20 | Core data structures |
| Month 4 | Graphs, DP (basic patterns) | 12-15 | Advanced topics |
| Month 5 | Revision, Mock Tests, Company-Specific | 10-12 | Exam preparation mode |
During Month 5, stop learning new topics. Seriously, stop. Revise your solved problems, participate in weekly contests, and do company-specific preparation based on where you're interviewing. For product companies, you'll likely face a system design interview round alongside DSA — start familiarizing yourself with those concepts in Month 4 so you're ready when it counts.
Parting Thoughts: Consistency Beats Intensity
Here's what I wish someone had told me during my own placement prep, and what I now tell every student I mentor.
Placement preparation is a marathon, not a sprint. Stop and read that sentence again. Marathon. Not sprint.
Students who succeed aren't the ones who solve the most problems. They're the ones who build strong fundamentals, practice consistently, and maintain their mental health through a stressful process. I've watched students solve 100 problems in a panic-fueled weekend and retain almost nothing. I've watched other students solve 3 problems a day for four months and walk into interviews with quiet confidence. Guess who gets the offers?
Consistency wins. Every single time. It's not glamorous advice. Won't get likes on LinkedIn. But it's true.
Take breaks. Exercise. Sleep enough — and I mean actually enough, not "I'll sleep when placements are over" nonsense. Talk to friends about things other than DSA. Watch a movie without guilt. Placement season is a few months of your life, and it's important, but it isn't everything. Not even close. A rejection from one company doesn't define your career. Some of the best engineers I know didn't get placed through campus at all.
And once you land that offer, our India tech salary guide for 2026 can help you evaluate and negotiate your compensation package.
Start today. Solve one problem today. Just one. Tomorrow, solve two. Build the habit first. Trust the process. Results follow consistency the way shadows follow objects — maybe not immediately visible, but always there.
You've got this. Now close this tab and go solve a problem.
Priya Patel
Senior Tech Writer
AI and machine learning specialist with 6 years covering emerging technologies. Previously a senior tech correspondent at TechCrunch India, she now writes in-depth analyses of AI tools, LLM developments, and their real-world applications for Indian businesses.
Stay Ahead in Tech
Get the latest tech news, tutorials, and reviews delivered straight to your inbox every week.
No spam ever. Unsubscribe anytime.
Comments (0)
Leave a Comment
All comments are moderated before appearing. Please be respectful and follow our community guidelines.
Related Articles

API Design: REST and GraphQL Patterns That Scale
API design guide covering REST, GraphQL, tRPC, authentication, rate limiting, error handling, and testing with Node.js examples.

Redis Caching: Speed Up Your App in Practice
Redis caching strategies, data structures, and cache invalidation with Node.js, Next.js, and Upstash integration guide.

TypeScript Advanced Patterns You Should Know
Advanced TypeScript: discriminated unions, template literals, branded types, builder pattern, and Zod validation with examples.