Data Structures and Algorithms (DSA) is the single most searched interview preparation topic among Indian engineers in 2026: and for good reason. DSA rounds are mandatory at every product company (Flipkart, Swiggy, Razorpay, Amazon, Google, Microsoft) and increasingly tested even at IT services companies' premium tracks (TCS Digital, Infosys Power Programmer, Wipro Elite). This guide gives you the complete preparation roadmap: what to study, in what order, how to practice efficiently, and what to do in the final week before an interview.
The DSA Preparation Roadmap: Topics in Study Order
Study in this order: each topic builds on the previous:
Phase 1: Foundation (Weeks 1–3)
1. Arrays: the building block of everything - Traversal, prefix sums, sliding window, two pointers - Key problems: Maximum subarray (Kadane's), Two Sum, Best time to buy/sell stock, Container with most water
2. Strings - String manipulation, palindromes, anagrams - Key problems: Valid anagram, Longest substring without repeating characters, Reverse words in a string
3. HashMap/HashSet - Frequency counting, existence checks, grouping - Key problems: Group anagrams, Top K frequent elements, Longest consecutive sequence
Phase 2: Core Data Structures (Weeks 4–6)
4. Linked List - Reversal, cycle detection, merging - Key problems: Reverse linked list, Detect cycle (Floyd's), Merge two sorted lists, Find middle node
5. Stack and Queue - LIFO/FIFO operations, monotone stack - Key problems: Valid parentheses, Daily temperatures, Sliding window maximum
6. Trees - Binary tree traversals (in/pre/post/level-order), BST operations - Key problems: Maximum depth, Level order traversal, Validate BST, LCA, Path sum
Phase 3: Advanced Topics (Weeks 7–10)
7. Graphs - BFS, DFS, cycle detection, topological sort - Key problems: Number of islands, Course schedule, Clone graph, Word ladder
8. Dynamic Programming - Start with 1D DP, then 2D DP - Key problems: Fibonacci (bottom-up), Climbing stairs, Coin change, Longest common subsequence, 0/1 Knapsack
9. Binary Search - Not just on sorted arrays; binary search on the answer - Key problems: Search in rotated sorted array, Find minimum in rotated array, Koko eating bananas
10. Heaps (Priority Queue) - Min-heap, max-heap, K-way operations - Key problems: Kth largest element, Merge K sorted lists, Top K frequent elements
Phase 4: Hard Problems (Weeks 11–12)
- Backtracking: Subsets, Permutations, N-Queens
- Tries: Implement a trie, Word search II
- Intervals: Merge intervals, Meeting rooms II
- Bit manipulation: Single number, Count bits
How to Practice LeetCode Effectively
Most Indian candidates fail DSA prep not because they don't study enough, but because they study inefficiently.
The pattern-first approach (not problem-first): Instead of solving random LeetCode problems, identify and master patterns. Once you recognise the pattern in a new problem, the solution follows a template.
Core patterns to master:
1. Sliding Window: for contiguous subarray/substring problems ```python # Template left = 0 for right in range(len(arr)): # expand window with arr[right] while windowconditionviolated: # shrink window from left left += 1 # update answer ```
2. Two Pointers: for sorted array problems or problems needing pair/triplet ```python left, right = 0, len(arr) - 1 while left < right: if condition: left += 1 else: right -= 1 ```
3. BFS Template: for shortest path, level-order, connected components ```python from collections import deque queue = deque([start]) visited = {start} while queue: node = queue.popleft() for neighbor in graph[node]: if neighbor not in visited: visited.add(neighbor) queue.append(neighbor) ```
4. DP Template: define state, transition, base case ```python # Coin change example dp = [float('inf')] * (amount + 1) dp[0] = 0 for coin in coins: for i in range(coin, amount + 1): dp[i] = min(dp[i], dp[i - coin] + 1) ```
The 4-step problem solving ritual (do this every time):
- Read the problem twice; identify constraints (sorted? unique? positive integers?)
- Think of the brute-force solution first: state it out loud or write it down
- Identify which pattern fits: sliding window? BFS? DP?
- Optimise from brute force, not from scratch
Practice schedule:
- Daily: 2 easy + 1 medium problem (timed: 15 min for easy, 30 min for medium)
- Weekly: 2 hard problems (45–60 min, look at solution after)
- After solving: always read top-voted solutions on LeetCode Discuss: there's always a more elegant approach
LeetCode 75: the minimal complete list: LeetCode's official Blind 75 list covers all the patterns above with the highest-signal problems. Complete this list in 6–8 weeks as your core prep.
DSA for Different Company Tiers in India
Not all companies require the same DSA depth. Match your preparation to your target:
IT Services Companies (TCS NQT Advanced, Infosys Power Programmer, Wipro Elite):
- Difficulty: LeetCode Easy to Easy-Medium
- Topics: Arrays, strings, basic sorting, basic recursion, simple pattern programs
- Time: 45–60 minutes for 2 problems
- Prep: 4–6 weeks, 100–150 Easy problems
Tier-2 Indian Product Companies (Freshworks, Zoho, Mphasis, LTIMindtree):
- Difficulty: LeetCode Medium
- Topics: Arrays, strings, linked list, trees, sorting, basic DP
- Time: 60–90 minutes for 2–3 problems
- Prep: 8–10 weeks, Blind 75 complete
Tier-1 Indian Product Companies (Flipkart, Swiggy, Razorpay, Zomato, Meesho):
- Difficulty: LeetCode Medium-Hard
- Topics: All of the above + Graphs, DP (2D), Heaps, Binary Search on Answer
- Time: 45 minutes per problem, 2 problems per round
- Prep: 12 weeks, Blind 75 + NeetCode 150 + 50 hard problems
FAANG India (Amazon, Google, Microsoft, Meta):
- Difficulty: LeetCode Hard expected for SDE-2+
- Topics: Full coverage including Tries, Segment Trees, Bit Manipulation, Advanced DP
- Time: 35–40 minutes per problem (faster pace)
- Prep: 16–20 weeks minimum, NeetCode 250 + company-specific LeetCode lists + mock interviews
The 'Google is Different' caveat: Google India (SWE L3/L4) has the hardest DSA bar in India: they expect Hard problems solved cleanly in 35 minutes, and the interviewer may ask follow-up optimisations. Google also tests algorithm design more than implementation: explaining the proof of correctness matters.
DSA knowledge and interview performance are not the same thing: you can solve a problem at your desk and freeze when explaining your approach to an interviewer. HireStepX's voice mock interviews train you to think out loud and structure your verbal explanation while coding, the skill that separates candidates who pass from those who know the material but can't demonstrate it.
Practice free12-Week DSA Study Plan for Product Company Readiness
Week 1–2: Arrays and Strings
- Daily: 2 easy + 1 medium from Arrays on LeetCode
- Target: Two Sum, Best Time to Buy Stock, Maximum Subarray, Product of Array Except Self, Container With Most Water
Week 3–4: HashMap, Stack, Queue
- Daily: 2 medium problems
- Target: Valid Parentheses, Daily Temperatures, Largest Rectangle in Histogram, LRU Cache
Week 5–6: Linked List and Trees
- Linked List: Reverse, detect cycle, merge sorted, find middle
- Trees: All traversals, max depth, validate BST, path sum, LCA
Week 7–8: Graphs and BFS/DFS
- Number of islands, course schedule, clone graph, Pacific Atlantic water flow
- Master BFS template for shortest path problems
Week 9–10: Dynamic Programming
- Week 9: 1D DP (climbing stairs, coin change, house robber, word break)
- Week 10: 2D DP (unique paths, edit distance, LCS, 0/1 knapsack)
Week 11: Binary Search, Heaps, Backtracking
- Binary search on sorted array, rotated array, on answer (aggressive cows, koko bananas)
- Heaps: Kth largest, top K frequent, merge K sorted lists
- Backtracking: Subsets, permutations, combination sum
Week 12: Mock Interviews
- 3 full mock interviews (timed, 45 min each, 2 problems per session)
- Use Pramp, AlgoMonster mock, or HireStepX for mock interview practice
- Review weak patterns from Weeks 1–11 based on mock performance
Free resources Indian engineers use:
- NeetCode.io: video explanations for all 150 problems with code
- Striver's SDE Sheet: 191 problems with topic-wise organisation, popular in India
- Abdul Bari's YouTube: algorithm explanations with visual animations
- Love Babbar's DSA sheet: Indian community favourite for structured prep
What to Do in the Week Before Your Interview
Days 7–5 before the interview:
- Stop learning new topics: only review patterns you already know
- Do 2 medium problems daily from your weakest area
- Review your 'mistakes notebook' (problems where your first approach was wrong)
Days 4–3 before the interview:
- One full mock interview per day (timed)
- Review the target company's recent LeetCode questions (LeetCode has a company filter)
- Write down the 3 patterns you're most likely to freeze on: review them
Day 2 before the interview:
- 1 easy problem to stay warm
- Focus on LP/behavioural prep if it's a company that tests this (Amazon especially)
- Review your resume projects: be able to explain the hardest technical decision in each
Day 1 before the interview:
- Rest. Do not practice. Sleep 8 hours.
- Review the 5 most common patterns (not problems): a 15-minute refresh
- Plan your logistics: interview link, quiet room, water, stable internet, backup hotspot
During the interview:
- Ask clarifying questions before coding (constraints, edge cases, expected output format)
- State your brute force first, then optimise: 'the naive O(n²) solution is X, I can improve this to O(n) using Y'
- Write clean code with meaningful variable names: not `a`, `b`, `c` but `left`, `right`, `maxSeen`
- Walk through your code with a test case after writing
- If stuck: say out loud what you're thinking: interviewers can hint if they know where you're stuck
Frequently asked questions
Practice these questions on HireStepX