In this guide
- Why Most DSA Preparation Fails
- What Product Companies in India Actually Test
- The Complete DSA Roadmap (13 Topics, in Order)
- The 15 Patterns That Cover 90% of Interview Problems
- The Week-by-Week Study Plan (4 Months)
- How to Practice — The Method That Actually Builds Skill
- Resources: What to Use, What to Ignore
- The 6 DSA Preparation Mistakes That Waste Months
- FAQ: DSA Preparation India
Meera had spent 18 months "preparing for interviews." She'd solved 350 LeetCode problems, watched 40 hours of video tutorials, and could quote the definition of every data structure. She failed every product company interview she attempted.
The problem wasn't practice volume — it was practice method. She was solving problems one by one, in random order, checking the solution after 10 minutes of frustration, watching a video explanation, and moving on. She had logged 350 problems but had genuinely understood maybe 80. Pattern recognition was zero. Under interview pressure, she was starting every problem from scratch.
This guide is about avoiding that trap. It's the roadmap that builds real, transferable interview skill — not the illusion of it.
1. Why Most DSA Preparation Fails
The standard advice — "solve 300 LeetCode problems" — is wrong. Not because 300 problems is the wrong number, but because it treats DSA preparation as a volume game when it's actually a pattern recognition game.
Product company interviews are not testing whether you've seen the exact problem before. They are testing whether you can:
- Recognize which algorithmic approach applies to a new problem
- Implement that approach cleanly under time pressure
- Communicate your thinking in real time
- Analyze time and space complexity correctly
These four skills are developed through pattern-based, deeply reflective practice — not through volume. The engineers who crack Google, Microsoft, Flipkart, and PhonePe interviews have one thing in common: they can identify the pattern in a new problem within 3–5 minutes. Everything else follows from that.
2. What Product Companies in India Actually Test
Not all product companies have the same bar. Calibrating your preparation to the companies you're actually targeting will save you months of wasted effort.
| Company Tier | Examples | DSA Difficulty | System Design |
|---|---|---|---|
| FAANG / Tier-1 Global | Google, Microsoft, Amazon, Meta, Apple | Medium–Hard LeetCode. DP and graphs are common. Optimality required. | Full system design round. HLD + deep dives. |
| Tier-1 Indian Product | Flipkart, Zepto, PhonePe, CRED, Swiggy, Meesho, Razorpay | Medium LeetCode dominant. Some Hard. Trees and graphs frequent. | 2–3 years exp: basic design sense. 4+ years: full system design. |
| Tier-2 Indian Product | Urban Company, Porter, Licious, ShareChat, Dunzo | Easy–Medium LeetCode. Arrays, hashmaps, and trees are the core. | Lightweight. High-level discussion at senior levels. |
| Global FinTech / SaaS | Stripe, Twilio, Atlassian, Postman (India offices) | Medium LeetCode. Clean code and complexity analysis emphasized. | Required from L4+. Scalability and reliability focused. |
3. The Complete DSA Roadmap (13 Topics, in Order)
The order matters. Each topic builds on the previous one. Do not skip ahead.
4. The 15 Patterns That Cover 90% of Interview Problems
The core insight of effective DSA preparation: most interview problems are variations of a small set of patterns. Master the pattern, and any variation becomes solvable within minutes.
| Pattern | When to Use | Representative Problems |
|---|---|---|
| 1. Two Pointers | Sorted array, "find pair with target sum", in-place manipulation | 3Sum, Container With Most Water, Valid Palindrome |
| 2. Sliding Window | "Longest/shortest subarray/substring with condition X" | Longest Substring Without Repeating Characters, Minimum Window Substring |
| 3. Fast & Slow Pointers | Cycle detection, finding middle of linked list | Linked List Cycle, Happy Number, Find Duplicate Number |
| 4. Merge Intervals | Overlapping intervals, scheduling problems | Merge Intervals, Meeting Rooms, Non-Overlapping Intervals |
| 5. Cyclic Sort | Numbers in range [1, n], find missing/duplicate | Find Missing Number, Find All Duplicates in Array |
| 6. In-place Linked List Reversal | Reverse a linked list or part of it | Reverse Linked List, Reverse Nodes in K-Group |
| 7. Tree BFS (Level Order) | Level-by-level processing, minimum depth, zigzag | Binary Tree Level Order, Right Side View, Zigzag Level Order |
| 8. Tree DFS | Path problems, subtree checks, LCA | Path Sum, Diameter of Binary Tree, Lowest Common Ancestor |
| 9. Two Heaps | Median of a stream, partition into two balanced halves | Find Median from Data Stream, Sliding Window Median |
| 10. Subsets / Combinations | Generate all subsets, permutations, combinations | Subsets, Permutations, Combination Sum |
| 11. Modified Binary Search | Search in rotated array, find range, binary search on answer | Search in Rotated Sorted Array, Find Minimum in Rotated Array, Koko Eating Bananas |
| 12. Top K Elements | Find K largest/smallest, K most frequent | Kth Largest Element, Top K Frequent Elements, K Closest Points |
| 13. K-way Merge | Merge K sorted lists/arrays, find Kth smallest across sorted lists | Merge K Sorted Lists, Kth Smallest Element in Sorted Matrix |
| 14. Topological Sort | Dependency problems, task scheduling, course prerequisites | Course Schedule, Alien Dictionary, Task Scheduler |
| 15. Dynamic Programming Patterns | Optimal substructure + overlapping subproblems | 0/1 Knapsack, Longest Common Subsequence, Coin Change, Jump Game |
5. The Week-by-Week Study Plan (4 Months)
This plan assumes 2 hours/day, 6 days/week. Adjust proportionally if your time differs. Do not skip "review weeks" — they are as important as learning weeks.
Week 1: Arrays, Strings, Hashmaps
- Arrays: Two Sum, Best Time to Buy Stock, Maximum Subarray (Kadane's), Product of Array Except Self
- Strings: Valid Anagram, Group Anagrams, Encode and Decode Strings, Longest Common Prefix
- Hashmaps: Two Sum (revisit with hashmap), Contains Duplicate, Top K Frequent Elements
- Target: 20–22 problems. Time each at 25 minutes max.
Week 2: Two Pointers & Sliding Window
- Two Pointers: 3Sum, Container With Most Water, Trapping Rain Water, Valid Palindrome II
- Sliding Window: Longest Substring Without Repeating Characters, Minimum Window Substring, Permutation in String, Longest Repeating Character Replacement
- Target: 18–20 problems.
Week 3: Binary Search & Sorting
- Binary Search: Search in Rotated Array, Find Minimum in Rotated Array, Time Based Key-Value Store, Koko Eating Bananas, Capacity to Ship Packages (binary search on answer)
- Sorting: Merge Intervals, Insert Interval, Non-Overlapping Intervals
- Target: 15–18 problems.
Week 4: Recursion, Linked Lists & Review
- Linked Lists: Reverse Linked List, Merge Two Sorted Lists, Reorder List, Remove Nth Node From End, Linked List Cycle
- Review: Re-solve 10 problems from Weeks 1–3 from scratch (timed). Identify which patterns you're slow on.
Weeks 5–6: Trees (Binary Trees & BSTs)
- BFS: Binary Tree Level Order Traversal, Right Side View, Zigzag Level Order, Minimum Depth
- DFS: Invert Binary Tree, Maximum Depth, Diameter of Binary Tree, Path Sum II, Maximum Path Sum
- BST: Validate BST, Kth Smallest Element, Lowest Common Ancestor (BST and general)
- Target: 22–25 problems over 2 weeks.
Weeks 7–8: Graphs
- BFS/DFS on graphs: Number of Islands, Clone Graph, Pacific Atlantic Water Flow, Surrounded Regions
- Topological Sort: Course Schedule, Course Schedule II, Alien Dictionary
- Union Find: Number of Connected Components, Redundant Connection, Accounts Merge
- Target: 20–22 problems over 2 weeks.
Weeks 9–10: Dynamic Programming
- 1D DP: Climbing Stairs, House Robber, Coin Change, Longest Increasing Subsequence, Word Break
- 2D DP: Unique Paths, Longest Common Subsequence, Edit Distance, Coin Change 2
- Interval DP: Burst Balloons, Palindromic Substrings
- Target: 20–22 problems. Spend more time on understanding than volume.
Weeks 11–12: Heaps, Backtracking & Stacks
- Heaps: Kth Largest Element, Task Scheduler, Find Median From Data Stream, Merge K Sorted Lists
- Backtracking: Subsets, Permutations, Combination Sum, N-Queens, Word Search
- Monotonic Stack: Daily Temperatures, Largest Rectangle in Histogram, Next Greater Element
- Target: 18–20 problems.
Weeks 13–16: Google-Tagged, Mocks, & Weak Spot Drilling
- Solve company-tagged problems (Google, Amazon, Microsoft, Flipkart tags on LeetCode Premium)
- 10 full mock interviews with a partner (45 min each, no hints, Google Doc environment)
- Revisit every topic where you solved less than 80% correctly in mocks
- System Design: 5 case studies (see Google interview guide above)
Want guided DSA prep with live problem solving?
Prepflix's DSA track covers all 15 patterns, 200+ curated problems, and 1-on-1 mock interviews.
1,572+ engineers placed at Google, Microsoft, Swiggy, Flipkart, PhonePe, and more. Watch the free training to see exactly how it works.
Watch Free Training →6. How to Practice — The Method That Actually Builds Skill
The practice method determines the outcome far more than the problem list. Here is the exact method that separates engineers who crack FAANG from those who plateau at 300 problems:
-
1Read the problem. Set a timer for 20 minutes. Think — don't code yet. In the first 5 minutes, identify: what category of problem is this? What data structures are relevant? What's the brute force approach and what's its complexity? Can you do better?
-
2Code the solution. If stuck after 20 minutes, look only at the approach — not the code. The goal is to struggle productively, not to feel permanently blocked. A hint on the approach (not the implementation) teaches pattern recognition. A full solution copy-paste teaches nothing.
-
3After solving, derive time and space complexity before checking. This is non-negotiable. If you can't derive the complexity yourself, you don't actually understand the solution. Interviewers ask this every time.
-
4Write a 3-line summary in your notebook: pattern, key insight, one edge case. This active recall step is where the learning actually happens. Writing forces you to distill the lesson. Reviewing your notebook is 10x more efficient than re-reading code.
-
5Spaced repetition: revisit solved problems at 1 week and 3 weeks. Re-solve the problem from scratch (no notes, no solution). If you can't solve it in 15 minutes, the understanding wasn't deep enough. Go back to the pattern.
7. Resources: What to Use, What to Ignore
Use These
- LeetCode (Premium for company tags). The best problem bank. Filter by topic, then by company for the last 3 months before interviews.
- NeetCode.io — free, high-quality video explanations organized by pattern. The best free resource for understanding solutions.
- Prepflix DSA Dashboard — curated 200-problem list by pattern, tracking progress and weak spots. Saves the curation work.
- Striver's A2Z DSA Sheet (free) — comprehensive and pattern-organized. Good starting structure for self-study.
Ignore These (Waste of Time for Interview Prep)
- Competitive programming platforms (Codeforces, CodeChef) for interview prep. Competitive programming builds a different skill set. An Codeforces expert can fail a Google interview.
- GeeksForGeeks articles as primary learning. GFG is a reference, not a teaching resource. Solutions are often not clean or interview-standard.
- Solving problems in an IDE with autocomplete. Practice in a plain text editor or Google Doc. Your interview environment will have neither.
- Watching solution videos without attempting the problem first. You learn nothing from watching. You learn everything from struggling.
8. The 6 DSA Preparation Mistakes That Waste Months
- Solving problems in random order. Topic-randomized practice feels like variety but builds zero systematic pattern recognition. Always follow a structured topic sequence.
- Checking solutions after 5–10 minutes. You need 20–25 minutes of genuine struggle to develop problem-solving intuition. Giving up early trains you to be helpless. Set a 20-minute timer and commit.
- Not verbalizing your thinking. DSA interviews are oral exams. If you practice silently, you are training the wrong skill. Narrate your thought process out loud even when practicing alone. It feels ridiculous. It works.
- Ignoring "Hard" problems entirely. You don't need to master Hard problems, but you should attempt 20–30 of them. Hard problems often test Mediums in a more complex setup — the exposure trains your pattern extension ability.
- Not tracking time per problem. Time awareness is critical. In interviews, you have 20–25 minutes to solve a problem after discussion. If you're consistently taking 45+ minutes per problem in practice, your speed needs work alongside your accuracy.
- Treating DSA as sufficient without System Design. For any company targeting 3+ years of experience candidates, System Design will be in the interview. Starting System Design prep in month 3 is often too late to develop genuine depth. Begin it concurrently in month 2.
9. FAQ: DSA Preparation India — Answered Directly
Should I use Python or Java for interview coding in India?
Use the language you know best. Python is increasingly popular in Indian product company interviews because of its concise syntax and built-in data structures (heaps, defaultdict, Counter). Java is well-accepted everywhere. C++ is fine but can be verbose. If you're equally comfortable in two languages, pick Python for interviews.
I'm 5 years into a service company (TCS). Is it too late to start DSA from scratch?
No. Experience in a service company doesn't hurt your DSA prep — it just means you haven't prioritized it yet. Engineers with 4–7 years of service company experience regularly crack Google and Microsoft interviews after 3–5 months of structured preparation. The age barrier in Indian tech hiring is for senior/staff roles (typically 8+ years), not mid-level roles. Start today.
Do companies in India ask DSA for experienced engineers (6+ years)?
Yes, but the weight shifts toward System Design at senior levels. At 6+ years, expect: 1–2 DSA rounds (often harder problems or design-oriented coding), 1–2 System Design rounds, and a behavioral round. DSA is still mandatory but is rarely the primary differentiator at senior levels — system thinking and communication become more important.
Is there a shortcut? What if I only have 6 weeks?
Six weeks can get you ready for Tier-2 Indian product company interviews if you are extremely focused. Target 100 problems across 6 high-priority patterns: Two Pointers, Sliding Window, Binary Search, Tree DFS/BFS, Graphs (basic), and Hashmaps. Skip DP and backtracking for now. Do 4–5 mock interviews in week 6. This is not ideal, but it's a viable plan for the right companies.
Pranjal spent 6+ years at Microsoft India and has personally guided 1,572+ engineers through their DSA and System Design journeys. He founded Prepflix to give engineers from service company backgrounds the same structured preparation that gets engineers from product company networks their FAANG offers.