DSA Roadmap for Beginners in India — From Zero to Interview-Ready in 6 Months
A complete, honest Data Structures & Algorithms roadmap for Indian students and freshers. Which topics to learn first, which platforms to use, how many problems to solve, and how to crack coding rounds at TCS, Wipro, Google, and startups.

Header Ad Advertisement
DSA is the single most important skill for getting a software engineering job in India. It's also the most misunderstood. Most students waste 6 months doing it wrong. This roadmap fixes that.
The Truth About DSA
Let's kill the myths first:
Myth 1: "You need to solve 500+ LeetCode problems"
Truth: 150–200 quality problems are enough for Tier 2 companies. 300–400 for Tier 1 (Google, Amazon).
Myth 2: "DSA is only for competitive programmers"
Truth: DSA for interviews is different from competitive programming. You need depth, not breadth.
Myth 3: "Start with the hardest topics first"
Truth: The order matters. Start with arrays and stop trying to do trees before understanding recursion.
Myth 4: "Language doesn't matter"
Truth: Use Python or Java. C++ is fine but slower to code in interviews. Python is fastest for prototyping.
The 6-Month Plan
Month 1: The Non-Negotiable Basics
Week 1–2: Arrays & Strings
Every other data structure builds on arrays. Master these first:
- Array traversal, insertion, deletion
- Two-pointer technique
- Sliding window
- Prefix sums
- String manipulation, palindrome checks, anagrams
Must solve (15 problems):
- Two Sum (LeetCode #1)
- Best Time to Buy and Sell Stock (#121)
- Contains Duplicate (#217)
- Maximum Subarray (#53) — Kadane's Algorithm
- Product of Array Except Self (#238)
- Valid Palindrome (#125)
- Reverse a String (#344)
- Group Anagrams (#49)
- Longest Substring Without Repeating (#3)
- Container With Most Water (#11)
- Plus Plus (#66)
- Move Zeroes (#283)
- Find the Duplicate (#287)
- Rotate Array (#189)
- Trapping Rain Water (#42) — Hard but worth it
Week 3–4: Hashing & HashMaps
Hashing reduces time complexity from O(n²) to O(n) in dozens of problems.
- Dictionary/HashMap operations
- Frequency counting
- Two-sum with HashSet
- Subarray problems with prefix hash
Key concept: whenever you need to check "have I seen this before?" — use a HashSet. Whenever you need to count occurrences — use a HashMap.
Month 2: Linked Lists, Stacks, Queues
Linked Lists (2 weeks)
Don't skip this. Linked list questions appear in almost every technical interview:
- Singly vs Doubly Linked List
- Reverse a linked list (iterative + recursive)
- Detect cycle (Floyd's algorithm)
- Find middle of linked list
- Merge two sorted linked lists
- Remove Nth node from end
The trick that makes linked list problems easy: use dummy nodes and two-pointer (slow/fast) technique.
Stacks & Queues (1 week)
Stack = LIFO, Queue = FIFO. But their interview use goes much further:
- Valid parentheses matching
- Next greater element
- Monotonic stack problems
- Queue using two stacks
- Sliding window maximum
Key insight: If a problem says "find the nearest greater/smaller element" — it's almost always a monotonic stack problem.
Month 3: Recursion & Trees
This is where most students get stuck. Don't skip recursion for trees.
Recursion (1.5 weeks)
Before touching trees, master recursion:
- Factorial, Fibonacci (iterative vs recursive)
- Print all subsets of an array
- Generate all permutations
- Tower of Hanoi
Mental model: Every recursive function answers: "What is the base case? What does the function do with the result from the smaller subproblem?"
Binary Trees (2 weeks)
Trees are the most commonly asked data structure in Indian placement interviews:
- Traversals: InOrder, PreOrder, PostOrder, Level Order
- Height and depth
- Diameter of binary tree
- Maximum path sum
- Check if binary tree is balanced
- Lowest Common Ancestor (LCA)
- Binary Search Tree operations
Critical realization: 80% of tree problems are solved by recursive DFS. Master the pattern:
def solve(node):
if not node: # base case
return base_value
left = solve(node.left) # solve left subtree
right = solve(node.right) # solve right subtree
return combine(left, right, node.val) # combine
Month 4: Sorting, Searching & Graphs
Sorting Algorithms (1 week)
You won't code Merge Sort in interviews often, but you WILL be asked about it:
- Bubble, Selection, Insertion — understand, don't memorize
- Merge Sort (O n log n) — know the divide-conquer approach
- Quick Sort — average O(n log n), worst O(n²)
- Heap Sort — via max/min heap
- Counting Sort, Radix Sort — for specific cases
Binary Search (1 week)
Binary search appears in unexpected places. The template:
left, right = 0, len(array) - 1
while left <= right:
mid = (left + right) // 2
if array[mid] == target:
return mid
elif array[mid] < target:
left = mid + 1
else:
right = mid - 1
return -1
Binary search on answer space is even more powerful: "Find minimum capacity to ship packages in D days" — this isn't searching in an array, it's searching on the answer range.
Graphs (2 weeks)
Graph problems intimidate beginners but follow clear patterns:
Core concepts:
- Graph representation: Adjacency List vs Matrix
- BFS (Breadth-First Search) — use for shortest path, level-by-level traversal
- DFS (Depth-First Search) — use for connected components, cycle detection, topological sort
- Visited array — always track visited nodes
Essential graph problems:
- Number of Islands (BFS/DFS)
- Clone Graph
- Course Schedule (Topological Sort + Cycle Detection)
- Network Delay Time (Dijkstra)
- Number of Connected Components
- Word Ladder (BFS)
Month 5: Dynamic Programming
DP is the boss level. Most Tier 1 companies end their hard rounds with DP.
The DP Thinking Process:
Every DP problem follows this pattern:
- Identify that it's DP: "optimal substructure + overlapping subproblems"
- Define what dp[i] means
- Find the recurrence relation
- Base cases — the simplest inputs
- Fill table (bottom-up) or memoize (top-down)
Start with these in order:
1D DP:
- Climbing Stairs (#70)
- House Robber (#198)
- Jump Game (#55)
- Coin Change (#322)
- Longest Increasing Subsequence (#300)
2D DP:
- Unique Paths (#62)
- Longest Common Subsequence
- 0/1 Knapsack
- Edit Distance (#72)
Advice: Don't try to memorize DP solutions. Understand the pattern of defining state and transition.
Month 6: Practice + System Design Basics
Pure Practice:
- Pick 3 new LeetCode problems daily (1 easy, 1 medium, 1 hard)
- Review unsolved problems — revisit problems you got wrong
- Mock interviews: Pramp.com (free), InterviewBit
System Design Basics (for Tier 2+):
- How to design a URL shortener (Bit.ly)
- How to design WhatsApp (message queues, WebSockets)
- How to design Twitter's feed (caching, load balancing)
This isn't needed for Tier 3, but Tier 2 companies like Zoho, Freshworks, Meesho ask simple system design.
Platform Guide — Where to Practice
| Platform | Best For | Cost |
|---|---|---|
| LeetCode | Interview prep, quality problems | Free (Premium ₹3,300/yr for company questions) |
| GeeksForGeeks | Indian placements, theory + practice | Free |
| InterviewBit | Structured roadmap, company-wise | Free |
| Codeforces | Competitive programming (not needed for placements) | Free |
| HackerRank | TCS/Infosys specific practice | Free |
Recommendation: LeetCode (primary) + GFG (theory) + InterviewBit (structured track).
How Many Problems = Ready?
| Target Company | Problems Solved | Suggested Level Split |
|---|---|---|
| TCS/Wipro/Infosys | 80–100 | 60% Easy, 40% Medium |
| Zoho/Freshworks | 150–200 | 30% Easy, 60% Medium, 10% Hard |
| Amazon/Microsoft India | 250–300 | 20% Easy, 60% Medium, 20% Hard |
| Google/Meta India | 350–400 | 10% Easy, 50% Medium, 40% Hard |
The Weekly Schedule That Works
Monday: Array/String problem (1 easy + 1 medium)
Tuesday: Linked List or Stack problem (1 medium)
Wednesday: Tree problem (1 medium + 1 hard)
Thursday: Graph problem (1 medium)
Friday: DP problem (1 medium)
Saturday: 2-hour mock interview (Pramp or self-timed LeetCode)
Sunday: Review the week's mistakes + revise weak topics
Consistency > intensity. 2 hours every day beats 14 hours on Saturday.
The Mindset That Gets You Hired
When you can't solve a problem in 20 minutes:
- Think aloud — say what you know
- Start with brute force — O(n²) solution first
- Optimize — ask "where is the redundancy? Can I cache this?"
- Code the optimized solution
Interviewers are watching HOW you think, not just WHETHER you get the answer. A candidate who writes a brute force solution clearly and explains how to optimize it is more impressive than someone who quietly stares and then suddenly writes perfect code.
The biggest competitive advantage in DSA interviews isn't knowing more algorithms — it's being able to clearly explain your reasoning under pressure.
Start today. Month 1. Arrays. Problem 1: Two Sum.
Mid Content Ad Advertisement
Interactive Developer Tools & Converters
View All Tools →Markdown Live Editor
Live Markdown editor with split-screen preview and HTML export.
Markdown Previewer
Real-time Markdown to HTML previewer and syntax validator with instant copy.
JSON Formatter
Format, validate and beautify JSON with syntax highlighting and error detection.
Base64 Encoder
Encode and decode Base64 strings and files instantly in your browser.
Editorial Disclaimer
The information in this article is provided for educational and informational purposes only. While we strive for accuracy, content may become outdated as technologies, regulations, and best practices evolve. Learntrix and Vyuhantrix make no warranties regarding the completeness, accuracy, or applicability of the information to your specific situation. Always verify critical information from primary and authoritative sources before implementation.
Last content review: September 2026 · Learntrix by Vyuhantrix
Copyright 2026 Vyuhantrix Technologies. All content on Learntrix is the intellectual property of Vyuhantrix. Reproduction, distribution, or republishing of this article — in whole or in part — without written permission from Vyuhantrix is strictly prohibited.
Footer Article Ad Advertisement
Related Articles
View all in Programming & Development →
How Your Aadhaar Card Actually Works — Biometrics, UIDAI & Privacy Explained
How does Aadhaar work technically? What happens when you scan your fingerprint? Where is your data stored? This guide explains UIDAI, biometrics, e-KYC, TOTP and your real privacy rights.

How to Get Your First Job as a Fresher in India (2026 Complete Roadmap)
A practical, honest guide for engineering and BCA/BBA freshers on getting their first job in India — which skills to build, where to apply, how to crack interviews, and what salaries to expect.
