Skip to main content
HireStepX is now in Beta! Be among the first to practice smarter and land your dream role.
Technical

DSA Interview Preparation Guide for Indian Engineers 2026

Complete DSA interview preparation guide for Indian software engineers in 2026. LeetCode roadmap, study plan, most common patterns, and tips for TCS.

General26 January 202611 min read4 sections

Data Structures and Algorithms (DSA) is the universal filter for software engineering interviews in India. From TCS to Google, every company tests problem-solving ability through DSA questions. The difference between candidates who clear coding rounds and those who do not is rarely raw intelligence: it is the quality and consistency of their preparation. This guide gives you the roadmap, the topic priorities, and the strategies that work.

4 sections

Not all companies test DSA at the same depth. Calibrate your preparation to your target:

Mass IT recruiters (TCS, Infosys, Wipro, Capgemini): Basic programming: loops, arrays, string manipulation, simple sorting. 1–2 coding questions at easy difficulty. Pass 80%+ of test cases = cleared. LeetCode Easy-level problems are sufficient.

Mid-tier product companies (Myntra, BigBasket, Razorpay, CRED for SDE-1): Medium-difficulty DSA. Expect 2 questions in 90 minutes. Arrays, strings, hashmaps, binary search, two pointers. 100–150 LeetCode problems (mix of easy and medium) is adequate preparation.

Unicorns and large product companies (Swiggy, PhonePe, Flipkart, Meesho): Medium-to-hard DSA. 2–3 problems in 90 minutes. All major topics tested: trees, graphs, DP, sliding window, backtracking.

FAANG India (Amazon, Microsoft, Google, Meta): Hard DSA. 4–5 coding rounds across the loop, each with 1–2 problems. Competitive difficulty. All topics, including segment trees, tries, advanced graph algorithms. 300–500 LeetCode problems of mixed difficulty is the preparation bar.

Instead of memorising 500 solutions, learn these patterns:

  • Two Pointers: Sorted array problems, palindrome checks, pair sum. Start with valid palindrome, two sum (sorted array), 3Sum.
  • Sliding Window: Subarray and substring problems with constraints. Start with maximum subarray (Kadane's), longest substring without repeating characters.
  • Fast and Slow Pointers: Cycle detection in linked lists. Floyd's cycle detection algorithm.
  • Binary Search: On sorted arrays and on answers. Start with classic binary search, search in rotated sorted array, find minimum in rotated sorted array.
  • Tree BFS / Level Order: Use a queue. All level-order traversal problems.
  • Tree DFS: Recursion. Inorder, preorder, postorder, path sum, LCA (Lowest Common Ancestor).
  • Dynamic Programming (DP): The hardest pattern. Start with 1D DP (climbing stairs, house robber), then 2D DP (longest common subsequence, edit distance). Avoid DP problems until you are comfortable with recursion.
  • Backtracking: N-queens, permutations, subsets, Sudoku solver. Learn the template (choose → explore → unchoose).
  • Graph BFS/DFS: Number of islands, word ladder, course schedule. Learn adjacency list representation.
  • Union-Find (Disjoint Set): Connected components, redundant connection.
  • Heap / Priority Queue: Kth largest element, merge K sorted lists, top K frequent elements.
  • Monotonic Stack: Next greater element, largest rectangle in histogram, daily temperatures.

Week 1–2: Foundation. Arrays, strings, hashmaps. Solve 3–5 problems daily on LeetCode. Aim for 30 easy problems in 2 weeks.

Week 3–4: Core structures. Linked lists, stacks, queues, binary search. 3–5 problems daily. Add 20 more problems.

Week 5–8: Trees and recursion. Binary trees, BST, recursion fundamentals, DFS and BFS on trees. This is the highest-yield preparation for most Indian interviews. 40 problems across this period.

Week 9–10: Graph algorithms. BFS, DFS, Union-Find, topological sort. Solve 20 graph problems.

Week 11–12: Dynamic Programming. Start with 1D DP (10 problems), then 2D DP (10 problems). Do not attempt advanced DP if your target is mass IT or mid-tier: focus time elsewhere.

Week 13 onward: Mock interviews. Do LeetCode contests weekly. Use HireStepX for coding discussion practice (explaining your approach). Time yourself on every problem: interview conditions require solutions within 15–20 minutes.

TrackingThe LeetCode company tags for Amazon, Microsoft, and Flipkart show the specific problems asked at each company. Prioritise these.

Mistake 1: Watching solutions without solving: Reading or watching an editorial and feeling like you understood it is not the same as solving it. Close the tab, open a blank editor, and write the solution from memory.

Mistake 2: Only solving easy problems: Easy problems build pattern recognition but do not prepare you for medium-difficulty interview questions. Move to medium problems as soon as you can solve easy problems consistently under 10 minutes.

Mistake 3: Not practising time constraints: In a real interview, you have 20–25 minutes per problem. Start timing yourself from Week 5 onward. Speed comes from pattern recognition, not from rushing.

Mistake 4: Skipping the communication habit: Indian engineers often solve problems silently. In interviews, you must think aloud. Practise explaining your approach before coding: 'I am going to use a sliding window here because the problem has a fixed-size subarray constraint and asks for the maximum...'

Mistake 5: Stopping at one solution: After finding a working solution, always ask: Is there a more optimal approach? Interviewers often follow up with 'Can you do better?' Knowing the O(n²) → O(n) improvement path is part of the skill.

Frequently asked questions

How many LeetCode problems do I need to solve for an Amazon interview?

Quality over quantity, but a practical benchmark: 200+ problems including all Amazon-tagged problems on LeetCode, with strong coverage of trees, graphs, two pointers, and DP. More importantly, you should be able to solve medium problems within 20 minutes consistently.

Is competitive programming necessary for Indian software engineering interviews?

Not for most roles. Competitive programming (Codeforces, CodeChef) develops speed and algorithmic breadth but goes beyond what standard SWE interviews need. For most product companies, LeetCode-focused preparation is more time-efficient.

What is the best paid DSA course for Indian engineers?

Striver's A2Z DSA Course (free on takeuforward.org) is widely considered the best DSA resource for Indian interview preparation. Scaler Academy's DSA module and Coding Ninjas' DSA track are popular paid alternatives.

Is Python acceptable for DSA interviews at Indian companies?

Yes: Python is accepted at all major companies. The only consideration is that Python is slower than C++ by a constant factor, so for time-critical problems you may need to optimise more carefully. For most interviews, this is not an issue.

Explore more

Continue reading

All posts

Practice

Know the answer. Now say it.

After you solve the problem, can you explain it? HireStepX's AI mock interviewer helps you practise thinking aloud and presenting your DSA solutions: the skill that wins coding rounds.