DSA Roadmap for Freshers

DSA roadmap for freshers 2026-2027: arrays, strings, linked list, stack and queue, trees and graphs, dynamic programming

If you’ve ever opened a “complete DSA sheet” with 450 problems and closed it ten minutes later, you’re not alone. The trick isn’t solving everything. It’s solving the right things, in the right order, for the companies you’re actually targeting.

First, pick your target

Target Coding level needed Focus
Service company base roles (TCS Ninja, Infosys SE, Wipro Elite) Easy Basic programming, arrays, strings, simple logic
Higher tracks (TCS Digital/Prime, Infosys SP/DSE, Cognizant GenC Next) Easy–Medium Arrays, hashing, sorting, recursion, basic DP
Product companies & GCCs Medium–Hard Full DSA including trees, graphs, DP

Pick one language and stick with it

C++, Java or Python all work. Choose the one you’re most comfortable writing without autocomplete. Learn its built-in data structures well: vectors and maps in C++, ArrayList and HashMap in Java, lists and dicts in Python.

The roadmap – phase by phase

 1: Foundations (Week 1–2)

  • Loops, conditions, functions, pattern problems
  • Time and space complexity – what O(n), O(n²) and O(log n) mean in practice
  • Basic maths: primes, GCD, digit problems, modulo

 2: Arrays and strings (Week 3–4)

  • Prefix sums, two pointers, sliding window
  • Sorting and binary search
  • String reversal, palindromes, anagrams, frequency counting

Honestly, this phase alone covers a large share of service-company coding rounds.

 3: Hashing, recursion, stacks and queues (Week 5–6)

  • HashMap and HashSet problems: two sum, duplicates, subarray sums
  • Recursion and backtracking basics: subsets, permutations
  • Stack problems: balanced brackets, next greater element

 4: Linked lists, trees and heaps (Week 7–8)

  • Reverse a list, detect a cycle, merge sorted lists
  • Binary tree traversals, height, BST operations
  • Priority queue problems: top K elements

 5: Graphs and dynamic programming (Week 9–12, for product companies)

  • BFS, DFS, connected components, shortest path
  • DP classics: climbing stairs, knapsack, longest common subsequence, coin change

How many problems is enough?

For service-company higher tracks, around 100–150 well-understood problems is usually plenty. For product companies, aim for 250–300, with real depth on medium problems. Understanding beats counting. If you can’t explain your solution out loud, you haven’t really solved it.

A daily routine that works

  • 2 problems a day: one new topic, one revision
  • Time-box each to 30–40 minutes, then read the solution and re-code it yourself the next day
  • One timed contest a week (LeetCode, CodeChef or HackerRank) to practise under pressure
  • Keep a “mistakes notebook” with the trick you missed on each problem

Where to practise for free

LeetCode (free tier), GeeksforGeeks practice, HackerRank, CodeChef and the free NPTEL Data Structures courses are more than enough. Company-specific prep, like the TCS NQT pattern, is covered in our TCS NQT syllabus guide.

Frequently asked questions

Can I crack placements without DSA?

You can clear some base-level service roles with basic programming. Most better-paying tracks, and almost all product companies, test DSA, though.

Which language is best for DSA?

C++ and Java are the most common in interviews, but Python is accepted almost everywhere. The best language is the one you can write fastest without mistakes.

How long does it take to learn DSA for placements?

With 2–3 focused hours a day, about 2–3 months gets most students ready for service-company higher tracks. Product-company preparation usually takes longer.

Next steps

Pair this with our 30-day placement plan, keep your resume ATS-ready, and apply to the latest openings as you go.

This roadmap is general preparation guidance. Test patterns vary by company and year, so check official notifications. CampusToDrive never charges for placement preparation or referrals.

Narendra p

Narendra founded PlacementDrive five years ago and has been writing about fresher jobs, off-campus drives, and career transitions ever since. What started as a small page sharing job updates has grown into a community of over 1 million students — and in all that time, we have never charged a single rupee for a job update. What Narendra writes about on CampusToDrive: • Daily verified job updates and off-campus drive alerts for freshers • Real interview experiences from top MNCs, collected directly from students in our community • Career transition guides for students moving from college to their first job Beyond content, Narendra is a full-stack digital marketer and works as a freelance software developer — which means the resume tips, ATS advice, and tech-career guidance on this site come from someone who actually works in the industry, not just writes about it. Narendra creates content across Instagram, YouTube, LinkedIn, and WhatsApp Channels, reaching lakhs of students every week.

Leave a Comment