DSA preparation is the single biggest determinant of success in Indian product company interviews. But the advice most candidates receive is vague ('do LeetCode') or overwhelming ('solve 500 problems'). This guide gives you a precise, company-calibrated framework: what topics each company type tests, how many problems you actually need, and a week-by-week preparation structure that works for freshers and experienced engineers alike.
The Indian Interview Landscape: What Each Company Type Tests
Not all DSA interviews are the same. FAANG India (Amazon, Google, Microsoft) tests medium-hard DSA across 4–5 rounds. Expect DP, graphs, trees, and heaps. Indian product unicorns (Flipkart, Swiggy, Razorpay, Meesho) test medium DSA, often with a practical twist: 'design a function' rather than a pure algorithm question. Service IT (TCS, Infosys, Wipro, Accenture) tests easy-medium arrays, strings, and sorting for fresher roles. Some service IT companies (Infosys InfyTQ, TCS NQT Advanced) have a distinct DSA section. Startups vary wildly: 0 to 2 DSA questions, often weighted toward system design and practical coding.
The Minimum Viable DSA Toolkit
You need to own 8 core patterns to pass the majority of Indian product company interviews: (1) Two pointers: pair sum, remove duplicates, container with most water. (2) Sliding window: max subarray of size k, longest substring without repeating characters. (3) Binary search: not just sorted arrays, but binary search on the answer (minimum time to complete tasks). (4) Hash maps: two sum, frequency counting, grouping anagrams. (5) Stacks and queues: next greater element, valid parentheses, BFS. (6) Trees: inorder/preorder/postorder traversal, LCA, max depth, path sum. (7) Graphs: BFS, DFS, topological sort, union-find for connected components. (8) Dynamic programming: Fibonacci variants, 0/1 knapsack, longest common subsequence, coin change. Master these 8; everything else is a variation.
How Many LeetCode Problems Do You Actually Need?
The honest answer, calibrated by tier: For service IT (TCS/Infy/Wipro) freshers: 50–75 Easy problems. Master arrays, strings, and sorting. For Indian product companies (Flipkart, Swiggy, Razorpay): 150–200 problems covering Easy + Medium, weighted toward the 8 patterns above. For FAANG India: 250–350 problems, including significant Medium and 30–40 Hard problems. The 'Blind 75' list is the best starting point: 75 problems that cover every important pattern. After the Blind 75, add the NeetCode 150 for breadth. After 150, the marginal return per problem drops significantly: depth of pattern understanding matters more than raw count.
DSA interviews require explaining your thinking while coding: the solution alone is not enough. Practise narrating your approach with HireStepX's AI interviewer until it feels natural.
Practice freeWeek-by-Week Preparation Plan (8 Weeks)
Week 1–2: Arrays and strings (two pointers, sliding window, prefix sums). Do 15–20 problems per topic. Week 3: Hash maps and sets. Focus on frequency counting and lookup patterns. Week 4: Stacks, queues, and monotonic stacks. Week 5: Binary trees (recursion heavy: inorder, LCA, diameter, path sum). Week 6: Graphs (BFS, DFS, topological sort, union-find). Week 7: Dynamic programming (start with 1D DP: climbing stairs, house robber, coin change; then 2D: grid paths, LCS). Week 8: Mock interviews: 2 timed problems per day, treated as real interviews. Narrate your approach out loud. Review time complexity after every problem. This plan works for experienced engineers too: compress it to 4 weeks by doubling daily practice.
Time Complexity: The Non-Negotiable
Every Indian product company interview expects you to state time and space complexity after each solution. The hierarchy: O(1) constant → O(log n) binary search → O(n) linear → O(n log n) sorting → O(n²) nested loops → O(2^n) exponential. Know these patterns by heart. A common trap: candidates solve a problem correctly but give wrong complexity. 'Merging two sorted arrays of size m and n' is O(m+n) time, not O(n log n). Always justify: 'The outer loop runs n times, the inner loop averages log n via binary search, so total is O(n log n).'
Common Mistakes Indian Candidates Make
Mistake 1: Grinding LeetCode without understanding patterns. After 200 random problems, candidates still cannot solve new problems because they memorise solutions rather than patterns. Fix: solve a problem, identify the pattern, find 3 more problems that use the same pattern. Mistake 2: Skipping the brute force. Always start by stating the naive O(n²) or O(n) solution, then optimise. Interviewers credit the thought process, not just the optimal answer. Mistake 3: Silence. Indian candidates often solve in their heads before speaking. Western-style 'think aloud' interviews reward narration: say what you are thinking as you think it. Mistake 4: Not testing on edge cases. Always test: empty input, single element, all same elements, negative numbers, very large input.
Frequently asked questions
Practice these questions on HireStepX