Skip to main content

DSA Roadmap for Campus Placements: What Actually Matters in 2026

A realistic DSA preparation roadmap for campus placements in India, covering topic priorities, platform choices, language selection, company-wise patterns, and time management strategies.

Priya Patel
16 min read
DSA Roadmap for Campus Placements: What Actually Matters in 2026

The DSA Anxiety Problem

Every engineering student in India goes through it. Third year hits, placement season is six months away, and suddenly everyone on LinkedIn is posting about solving 500 LeetCode problems and cracking FAANG interviews. Your college WhatsApp groups are flooded with "bro which DSA sheet should I follow" and "is Striver's A2Z enough for TCS NQT." The anxiety is overwhelming, and it often leads to the worst possible outcome: paralysis.

I have been through this process myself and have since mentored over 50 students through placement preparation. Here is what I have learned: 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 is wider than you think.

This is not going to be another generic "learn arrays, then learn trees, then learn graphs" list. I want to give you an honest assessment of what companies in India actually test, how to prioritize your limited time, and the mistakes that cost students offers.

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.

Service Companies (TCS, Infosys, Wipro, Cognizant, Accenture)

These companies hire in bulk — 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

The bar is not high for DSA here. If you can solve easy-to-medium problems on any platform, you will clear these rounds. The real differentiator for service company placements is usually the aptitude round (verbal, logical, quantitative) and communication skills during the interview.

Product Companies (Google, Microsoft, Amazon, Flipkart, PhonePe, Razorpay, etc.)

These companies have a fundamentally different hiring bar. Their interviews test:

  • Problem-solving ability — can you break down an unfamiliar problem?
  • Optimal solutions — brute force gets you partial credit at best
  • Code quality — clean, bug-free code written under pressure
  • Communication — explaining your thought process clearly

The topics they test overlap heavily across companies. After analyzing hundreds of interview questions from Indian placement drives, here is the frequency distribution:

TopicFrequency in InterviewsPriority
Arrays / StringsVery HighMust Learn
Hashing (HashMaps/Sets)Very HighMust Learn
Two Pointers / Sliding WindowHighMust Learn
Binary SearchHighMust Learn
Stacks / QueuesHighMust Learn
Linked ListsMedium-HighMust Learn
Trees (Binary Trees, BST)HighMust Learn
Graphs (BFS, DFS)MediumShould Learn
Dynamic ProgrammingMedium-HighShould Learn
Recursion / BacktrackingMediumShould Learn
Heaps / Priority QueuesMediumShould Learn
TriesLow-MediumNice to Have
Segment Trees / BITLowSkip for most
Advanced Graph (Dijkstra, etc.)LowNice to Have

The Topic Priority Order (And Why It Matters)

Here is the order I recommend, and the reasoning behind each stage. Each stage builds on the previous one, so do not skip ahead.

Stage 1: Arrays and Strings (2-3 weeks)

This is the foundation of everything. Over 40% of placement coding questions involve arrays or strings in some form. If you are weak here, nothing else matters.

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.

Stage 2: Hashing (1-2 weeks)

HashMaps and HashSets are the most underrated tools in competitive programming. A shocking number of "hard" problems become trivial when you think in terms of hash lookups.

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. This stage goes fast because the concept is straightforward.

Stage 3: Two Pointers and Sliding Window (2 weeks)

These two techniques come up in interviews constantly. They are also the techniques where the jump from brute force (O(n^2)) to optimal (O(n)) is most dramatic.

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 recognizing when to apply them.

Stage 4: Binary Search (1-2 weeks)

Binary search is not just "find an element in a sorted array." It is 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.

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 on "binary search on answer" problems — they are interview favorites.

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 are 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.

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.

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.

Stage 7: Graphs (2 weeks)

Graph problems scare students, but the core techniques are limited:

  • 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 are interviewing at Google or a competitive programming-heavy company.

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, and for good reason — it requires a different way of thinking. But here is the reassuring truth: most DP problems in placements fall into a handful of categories:

  • 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 do not need to solve 200 DP problems. Understand the categories, recognize the patterns, and solve 5-8 problems from each category.

Target: 40-50 problems across the categories above.

How Many Problems Should You Actually Solve?

The internet will tell you to solve 500+ problems. Some people brag about 1000+. Here is 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 — will outperform someone who rushes through 500 problems copying solutions they half-understand.

My recommended target: 200-300 well-understood problems over 4-5 months.

That breaks down to roughly 2-3 problems per day, which is sustainable alongside college coursework. On weekends, push to 4-5 problems per day.

Platform Comparison

PlatformBest ForIndian RelevanceCost
LeetCodeProduct company prep, pattern recognitionVery HighFree (Premium: Rs 1,100/month)
CodeforcesCompetitive programming, speedMedium (for CP culture)Free
GeeksforGeeksTheory + practice, service company prepVery HighFree (Courses: paid)
Coding Ninjas (Naukri)Structured learning, company-specific questionsHighPaid (Rs 6,000-20,000)
InterviewBitFocused interview prepHighFree
HackerRankCertifications, some companies use it for testsMediumFree

My recommendation: Use LeetCode as your primary platform for problem-solving. Use GeeksforGeeks for theory and explanations. 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 are targeting specific companies. The company-wise question lists and frequency data save significant time.

Language Choice: C++ vs Java vs Python

This debate has raged for years. Here is my practical take:

C++ — Fastest execution, which matters on platforms with tight time limits. The STL (Standard Template Library) is powerful. Most competitive programming resources and editorials are in C++. However, the syntax is verbose, and debugging is harder.

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 are 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.

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.
  • 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.

Do not switch languages mid-preparation. Pick one, master its standard library for DSA, and stick with it.

Common Mistakes in Contests and Interviews

After mentoring dozens of students, these are the patterns I see repeatedly:

1. Not Reading the Problem Fully

I cannot stress this enough. Students see a problem that "looks like" something they have 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.

Fix: Read the problem twice. Identify the input constraints (they hint at the expected time complexity). Walk through the examples by hand.

2. Jumping to Code Without a Plan

The optimal approach is: understand problem, identify pattern, plan solution on paper (or in your head), then code. Most students skip steps 2 and 3.

Fix: Before writing any code, explain your approach out loud (or in your head) in 2-3 sentences. If you cannot explain it clearly, you do not understand it well enough to code it.

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.

Fix: After coding, mentally test with: empty input, single element, all same elements, very large input, and negative values.

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.

Fix: If you do not have a clear approach within 10 minutes, move on. Come back later if time permits. Partial solutions often earn partial credit.

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.

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.

How to Approach Unseen Problems

Every interview will throw at least one problem you have never seen before. That is the point — they are testing your problem-solving ability, not your memory.

Here is a framework that works:

  1. Identify the input/output types. Array to number? String to string? Array to array? This narrows down the possible approaches.

  2. 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. If n is at most 10^3, O(n^2) is acceptable.

  3. Try the brute force first. Even if it is too slow, writing out the brute force helps you understand the problem and often reveals optimization opportunities.

  4. Ask: can I sort the input? Sorting often simplifies problems dramatically and "only" costs O(n log n).

  5. Ask: can a HashMap help? If you are doing repeated lookups or counting, hashing reduces O(n) lookups to O(1).

  6. Ask: does this have overlapping subproblems? If the same subproblem is solved multiple times in your brute force, DP might apply.

  7. Ask: is there a monotonic property I can binary search on? If "too small" and "too big" have a boundary, binary search on that boundary.

Company-Wise Patterns

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

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

Google (SWE Intern / L3)

  • Graph problems, DP, greedy algorithms
  • Emphasis on optimal 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

MonthFocusProblems/WeekActivity
Month 1Arrays, Strings, Hashing15-20Foundation building
Month 2Two Pointers, Binary Search, Stacks/Queues15-20Pattern recognition
Month 3Trees, Linked Lists, Recursion15-20Core data structures
Month 4Graphs, DP (basic patterns)12-15Advanced topics
Month 5Revision, Mock Tests, Company-Specific10-12Exam preparation mode

During Month 5, stop learning new topics. Revise your solved problems, participate in weekly contests, and do company-specific preparation based on where you are interviewing.

Parting Thoughts

Placement preparation is a marathon, not a sprint. The students who succeed are not the ones who solve the most problems — they are the ones who build strong fundamentals, practice consistently, and maintain their mental health through a stressful process.

Take breaks. Exercise. Sleep enough. Talk to friends about things other than DSA. The placement season is a few months of your life, and it is important, but it is not everything. A rejection from one company does not define your career. Some of the best engineers I know did not get placed through campus at all.

Start today. Solve one problem today. Tomorrow, solve two. Build the habit, trust the process, and the results will come.

Advertisement

Advertisement

Ad Space

Share

Priya Patel

Senior Tech Writer

Covers AI, machine learning, and emerging technologies. Previously at TechCrunch India.

Comments (0)

Leave a Comment

Related Articles