DSA · LeetCode · Product Companies · India 2026

DSA Roadmap India 2026

Complete LeetCode preparation guide for product company interviews — topic order, key patterns, problem lists, and 3-month and 6-month prep schedules for Amazon, Google, Microsoft, and Indian unicorns.

✍️ Pranjal Jain, Ex-Microsoft · IIT Kanpur 📅 June 8, 2026 ⏱ 24 min read

Why DSA Still Matters in 2026

Despite debates about AI replacing coding interviews, every major product company in India — Amazon, Microsoft, Google, Flipkart, Swiggy, Zomato, Zepto, CRED, Razorpay — still uses algorithmic coding rounds as a core signal for SDE hiring. The reason is simple: DSA problems test problem decomposition and structured thinking under pressure — skills that directly correlate with engineering quality.

💡
The 80/20 of DSA prep: 80% of product company interview problems come from 20% of topics: Arrays, Trees, Graphs, and Dynamic Programming. Master these four thoroughly before touching niche topics like bit manipulation, tries, or segment trees. Most failed interviews aren't from unknown topics — they're from a weak foundation in the fundamentals.

Topic-by-Topic Roadmap

1
Arrays & Strings
Foundation for everything. Two-pointer, prefix sum, sliding window, sorting, binary search on arrays.
2–3 weeks
Start Here
2
Two Pointers & Sliding Window
Often combined with arrays. Longest substring, minimum window substring, 3Sum, container with most water.
1 week
Easy–Medium
3
Recursion & Backtracking
Subsets, permutations, N-queens, Sudoku solver. Critical before tackling trees and graphs.
2 weeks
Medium
4
Stacks & Queues
Monotonic stack, next greater element, valid parentheses, implement queue using stacks, LRU cache.
1 week
Easy–Medium
5
Linked Lists
Reverse, cycle detection, merge sorted lists, add numbers, LRU cache, deep copy with random pointer.
1 week
Easy–Medium
6
Binary Search
Search in rotated array, find peak element, minimum in rotated array, koko eating bananas (binary search on answer).
1 week
Medium
7
Trees (BT & BST)
All traversals, LCA, diameter, max path sum, serialize/deserialize, validate BST, BST iterator, boundary traversal.
2–3 weeks
Medium–Hard
8
Heaps / Priority Queues
Top-K problems, Kth largest, merge K sorted lists, median from data stream, task scheduler, find K closest points.
1 week
Medium
9
Hashing (HashMap & HashSet)
Two sum, group anagrams, top K frequent, longest consecutive sequence, first non-repeating character.
1 week
Easy–Medium
10
Graphs (BFS, DFS, Dijkstra, Topo Sort)
Number of islands, clone graph, course schedule (topological sort), network delay time (Dijkstra), word ladder, bipartite check.
2–3 weeks
Medium–Hard
11
Dynamic Programming
The hardest topic. 1D DP (climbing stairs, house robber), 2D DP (grid paths, LCS), knapsack, coin change, edit distance, partition DP.
4–6 weeks
Hard
12
Advanced: Tries, Segment Trees, Bit Manipulation
Optional for most companies. Required for Google/Codeforces-heavy interviews. Trie for prefix search, segment tree for range queries.
2–3 weeks
Hard (Optional)

Key Patterns to Master

🪟 Sliding Window

  • Longest substring without repeating
  • Minimum window substring
  • Max consecutive ones III
  • Fruit into baskets

👆 Two Pointers

  • Two Sum (sorted array)
  • 3Sum, 4Sum
  • Container with most water
  • Trapping rain water

📊 Prefix Sum

  • Subarray sum equals K
  • Product of array except self
  • Range sum queries
  • Maximum size subarray sum = k

🔢 Binary Search on Answer

  • Koko eating bananas
  • Min days to make M bouquets
  • Aggressive cows (classic)
  • Capacity to ship packages

📈 Monotonic Stack

  • Next greater element
  • Daily temperatures
  • Largest rectangle in histogram
  • Stock span problem

🏔️ BFS on Matrix / Graph

  • Number of islands
  • 01 Matrix (distance to nearest 0)
  • Rotting oranges
  • Word ladder

🔁 Topological Sort

  • Course schedule I & II
  • Alien dictionary
  • Task dependencies
  • Minimum time to finish tasks

💰 DP Patterns

  • 0/1 Knapsack family
  • Unbounded knapsack (coin change)
  • LCS / LIS family
  • Partition DP (palindrome, MCM)

Prep Schedule: 3 Months vs 6 Months

3-Month Sprint (Working Professional: 2–3 hrs/day)

Month 1: Foundations (Topics 1–6)

Arrays, strings, two pointers, sliding window, recursion, backtracking, stacks, queues, linked lists, binary search. Target: 60 LeetCode problems (45 Easy, 15 Medium). Focus on recognizing problem types and writing clean code quickly.

Month 2: Trees, Graphs, Heaps (Topics 7–10)

Trees (BT, BST), heaps, hashing, graphs (BFS, DFS, Dijkstra, topological sort). Target: 70 problems (20 Easy, 40 Medium, 10 Hard). Mock interview weekly with a study partner.

Month 3: Dynamic Programming + Mock Interviews

1D DP, 2D DP, knapsack patterns, interval DP. Target: 40 DP problems (15 Medium, 25 Hard) + 3 full mock interviews + system design basics for SDE-2 targets. Review behavioral stories (STAR method for Amazon).

6-Month Deep Prep (Fresher / Career Changer)

Month 1–2: Foundations (Topics 1–6)

Same as 3-month Month 1 but at a slower pace. Extra time: revisit data structure theory (how HashMap works internally, how heaps are implemented), solve 15–20 LeetCode contest problems to build speed.

Month 3: Trees, Graphs (Topics 7–10)

Deep dive into trees and graphs. Implement BFS, DFS, Dijkstra, and union-find from scratch without IDE. Weekly timed practice sessions (30-min per problem, no hints).

Month 4–5: Dynamic Programming

Spend 6–8 weeks on DP — it requires the most time. Start with memoization → tabulation → space optimization. Track patterns (not just problems). Aim: 60+ DP problems.

Month 6: Mock Interviews + System Design + Revisions

10+ mock interviews (5 DSA, 3 system design, 2 behavioral). Fix weak areas from mocks. System design study (Grokking System Design, DDIA book). Behavioral prep (10 STAR stories). Active job application start.

Company-Specific DSA Focus

CompanyMost Asked TopicsDifficultySpecial Notes
AmazonTrees, Arrays, Graphs, DP, HeapMedium (mostly)Behavioral (Leadership Principles) in every round — STAR stories required
Microsoft IndiaTrees, Arrays, Graphs, String manipulationEasy–MediumProblem-solving process matters more than optimal solution. Think aloud.
Google IndiaGraphs, DP, Arrays, Segment Trees, TriesHardHigher difficulty bar than other FAANG. Needs competition-level thinking.
FlipkartArrays, Trees, DP, System Design (SDE-2)MediumStrong LLD (Low-Level Design) round — design parking lot, elevator, snake game
Swiggy / ZomatoArrays, HashMap, DP, GraphsMediumProduct-specific scenarios: geolocation, delivery ETAs, menu search optimization
PhonePe / PaytmArrays, DP, Graphs, LLDMediumFintech-flavored system design: payment system, wallet, KYC pipeline

Best Resources 2026

ResourceBest ForCost
LeetCode PremiumCompany-tagged problems, mock assessments~₹1,200/month
Striver's A2Z DSA SheetStructured topic-wise problem list (free)Free
Neetcode.io150-problem curated list + video solutionsFree (paid advanced)
Grokking Algorithm Patterns (Educative)Pattern recognition focus~₹800/month
CLRS (Introduction to Algorithms)Deep theory understandingBook ~₹2,500
Codeforces (A/B/C problems)Speed + problem variety (Google prep)Free
⚠️
Common DSA prep mistakes: (1) Solving problems without understanding — memorizing solutions kills growth. Always solve before reading. (2) Skipping DP because it's hard — DP is the #1 gap between candidates. (3) Not timing yourself — in interviews you have 30–40 min per problem. Practice with a timer. (4) Neglecting behavioral prep — Amazon rejects technically strong candidates for weak STAR stories. (5) Starting system design too late — for SDE-2 roles, start system design in parallel with DSA from month 2.

Frequently Asked Questions

Should I use LeetCode, HackerRank, or InterviewBit for DSA prep?
LeetCode is the gold standard for product company interviews in India. Company-specific problem tags on LeetCode Premium are directly relevant to Amazon, Microsoft, Google, and Flipkart screens. HackerRank is good for basic skill-building but the problem quality for hard topics is lower. InterviewBit is good for structured learning (topic-by-topic) as a supplement. Recommendation: LeetCode as primary, Striver's A2Z sheet as structure guide, Neetcode.io videos for explanations when stuck.
Can I crack product company interviews solving only Easy and Medium problems?
For most Indian product companies (Swiggy, Flipkart, Razorpay, PhonePe, Zepto): yes — a strong command of Medium problems is sufficient. For FAANG-tier (Google India, DeepMind, Meta): you need Hard problems regularly. Amazon and Microsoft India primarily use Medium problems but occasionally include Hard in later rounds or for senior roles. The key differentiator at medium difficulty: speed, code quality, and handling edge cases — not just getting the right answer.
Is DSA important for experienced engineers in India (5+ years)?
Yes — all major product companies in India (Amazon, Google, Microsoft, Flipkart, CRED, Razorpay) conduct algorithmic coding rounds for experienced engineers regardless of years of experience. The difference: for senior engineers (SDE-2/SDE-3), the coding round is shorter or less dominant compared to the system design and behavioral rounds. A senior engineer needs to solve Medium problems correctly and quickly, then spend most interview time on architecture, trade-offs, and leadership stories.
Pranjal Jain
Pranjal Jain

Ex-Microsoft SDE · IIT Kanpur · Founder of Prepflix. Interviewed by and for teams at Microsoft, helping hundreds of Indian engineers navigate the DSA interview gauntlet.