DSA Patterns You Actually Need: FAANG vs Product Companies vs Startups vs Service Companies (2026)
Exact DSA patterns required at each company tier — what Google expects vs what a Series-A startup asks vs what TCS/Infosys tests. Stop wasting time on patterns your target company will never ask.
Stop Preparing the Same Way for Every Company
The single biggest mistake in DSA preparation: treating every company the same. An engineer preparing for Google should NOT follow the same strategy as someone targeting Flipkart, a YC startup, or Infosys.
Each company tier has different:
- Problem difficulty — Google asks Hard-level problems. Most startups stick to Easy-Medium.
- Pattern distribution — FAANG loves graphs and DP. Service companies focus on arrays and sorting.
- Evaluation criteria — FAANG evaluates HOW you solve. Service companies often just check IF you solve.
- Time pressure — Meta gives 20 min/problem. Startups might give 45 minutes for one problem.
- Follow-up depth — Google expects optimization discussion. Service companies rarely ask follow-ups.
This guide maps EXACTLY which patterns to prioritize based on your target company tier — so you don't waste weeks studying graph algorithms for a company that only asks array problems.
Company Tier Definitions (Where Do You Fit?)
Tier 1: FAANG / Big Tech
Google, Amazon, Meta, Apple, Microsoft, Netflix, Uber, Airbnb, Stripe, Databricks, Bloomberg, LinkedIn, Twitter/X, Salesforce, Oracle (cloud division)
Characteristics: Hardest interviews, multiple rounds, 45-min coding sessions, 2 problems per round at Meta, follow-up optimizations expected, communication weighted heavily.
Tier 2: Mid-Tier Product Companies
Flipkart, Swiggy, Zomato, PhonePe, Razorpay, Atlassian, Intuit, Adobe, VMware, ServiceNow, Nutanix, Directi, Dream11, Meesho, ShareChat, Cred, Groww
Characteristics: Medium-Hard problems, 1-2 coding rounds, system design at mid-level+, good communication expected but less weighted than FAANG, practical coding valued.
Tier 3: Startups (Series A-C)
Early-to-mid stage funded startups, YC companies, small engineering teams (10-100 engineers)
Characteristics: Practical coding over algorithmic puzzles, real-world problems, take-home assignments common, culture fit weighted heavily, speed of execution valued.
Tier 4: Service-Based Companies
TCS, Infosys, Wipro, Cognizant, HCL, Accenture, Capgemini, Tech Mahindra, Mindtree, Mphasis
Characteristics: Online assessments (MCQ + coding), Easy-Medium problems, focus on fundamentals (sorting, searching, basic data structures), high volume hiring, auto-graded solutions.
The Master Pattern Chart
| Pattern | FAANG | Mid-Product | Startups | Service |
|---------|-------|-------------|----------|---------|
| Two Pointers | ★★★ | ★★★ | ★★ | ★★ |
| Sliding Window | ★★★ | ★★★ | ★★ | ★ |
| Hash Map | ★★★ | ★★★ | ★★★ | ★★★ |
| Binary Search | ★★★ | ★★★ | ★★ | ★★ |
| BFS/DFS (Trees) | ★★★ | ★★★ | ★★ | ★ |
| BFS/DFS (Graphs) | ★★★ | ★★ | ★ | ★ |
| Dynamic Programming | ★★★ | ★★ | ★ | ★ |
| Backtracking | ★★ | ★★ | ★ | — |
| Monotonic Stack | ★★ | ★★ | ★ | — |
| Topological Sort | ★★ | ★ | ★ | — |
| Union-Find | ★★ | ★ | — | — |
| Trie | ★★ | ★ | — | — |
| Heap / Priority Queue | ★★ | ★★ | ★ | ★ |
| Greedy | ★★ | ★★ | ★★ | ★★ |
| Sorting Algorithms | ★ | ★★ | ★★ | ★★★ |
| Linked List Ops | ★ | ★★ | ★ | ★★★ |
| Stack/Queue Basics | ★ | ★★ | ★★ | ★★★ |
| Recursion Basics | ★ | ★★ | ★★ | ★★★ |
| String Manipulation | ★★ | ★★ | ★★ | ★★★ |
| Bit Manipulation | ★ | ★ | — | ★★ |
How to read: ★★★ = Must master (appears 70%+) · ★★ = Important (30-60%) · ★ = Occasionally asked (10-30%) · — = Rarely/never asked
| Company Tier | Time Needed | Problems to Solve | Difficulty Split |
|---|---|---|---|
| FAANG | 4-6 months | 200-300 | 20% Easy, 60% Medium, 20% Hard |
| Mid-Product | 2-4 months | 150-200 | 30% Easy, 60% Medium, 10% Hard |
| Startups | 2-4 weeks + projects | 50-80 | 50% Easy, 45% Medium, 5% Hard |
| Service | 2-3 weeks | 60-100 | 60% Easy, 35% Medium, 5% Hard |
FAANG / Big Tech: Complete Pattern Guide
Must-Master Patterns (Appear in 80%+ of FAANG interviews)
1. Two Pointers & Sliding Window
Why FAANG loves these: They test whether you can optimize brute force from O(n²) to O(n). Classic "can you do better?" follow-up territory.
Problems to master:
- Container With Most Water (two pointers from ends)
- Longest Substring Without Repeating Characters (sliding window — variable size)
- Minimum Window Substring (hard sliding window with character counting)
- 3Sum (sort + two pointers, handling duplicates)
- Trapping Rain Water (two pointers or stack — Google favorite)
FAANG twist: After solving, interviewer asks "What if the array doesn't fit in memory?" (streaming/external memory variant)
2. Binary Search (Including on Answer Space)
Why FAANG loves this: Tests precision, edge case handling, and the ability to apply binary search to non-obvious scenarios.
Problems to master:
- Search in Rotated Sorted Array (modified binary search)
- Find Minimum in Rotated Sorted Array (binary search variant)
- Koko Eating Bananas (binary search on answer)
- Split Array Largest Sum (binary search on answer — hard)
- Median of Two Sorted Arrays (binary search — HARD, Google classic)
FAANG twist: "Binary search on answer" problems where you're searching the solution space, not an array.
3. Trees — BFS and DFS
Why FAANG loves these: Recursive thinking, multiple valid approaches (iterative vs recursive), and natural follow-up questions.
Problems to master:
- Binary Tree Level Order Traversal (BFS template)
- Lowest Common Ancestor (DFS recursive)
- Serialize and Deserialize Binary Tree (design + DFS/BFS)
- Binary Tree Maximum Path Sum (hard DFS — Google/Meta favorite)
- Validate BST (inorder property)
- Diameter of Binary Tree (DFS with global tracking)
FAANG twist: "Now do it iteratively" or "What if it's not a binary tree?" (N-ary tree)
4. Graph Algorithms
Why FAANG loves these: Complex, hard to memorize, require real understanding. Separates candidates who understand vs. those who memorize.
Problems to master:
- Number of Islands (BFS/DFS on matrix)
- Course Schedule I & II (topological sort — cycle detection)
- Clone Graph (BFS/DFS + hash map)
- Word Ladder (BFS shortest path — Amazon favorite)
- Shortest Path in Binary Matrix (BFS on grid)
- Network Delay Time (Dijkstra's algorithm)
- Alien Dictionary (topological sort on characters — Google/Meta)
FAANG twist: "What if the graph is too large to fit in memory?" (distributed BFS), "What if edges have weights?" (transition to Dijkstra)
5. Dynamic Programming
Why FAANG loves this: Tests abstract thinking, subproblem decomposition, and optimization skills. The "boss level" of patterns.
Problems to master:
- Climbing Stairs / House Robber (1D DP warm-up)
- Longest Increasing Subsequence (classic 1D, then O(n log n) optimization)
- Coin Change (unbounded knapsack variant)
- Longest Common Subsequence (2D DP)
- Edit Distance (2D DP — important for real applications)
- Word Break (1D DP with set lookup)
- Unique Paths (2D grid DP — easy warm-up)
- Partition Equal Subset Sum (0/1 knapsack)
FAANG twist: "Can you optimize space from O(n×m) to O(n)?" (rolling array technique). "What's the actual answer, not just the count?" (backtracking through DP table)
Important Patterns (Appear in 30-50% of FAANG interviews)
6. Heap / Priority Queue
- Merge K Sorted Lists (min-heap)
- Top K Frequent Elements (heap or quickselect)
- Find Median from Data Stream (two heaps)
- Task Scheduler (greedy + heap)
7. Monotonic Stack
- Next Greater Element (classic monotonic stack)
- Largest Rectangle in Histogram (hard — Amazon/Google)
- Daily Temperatures (monotonic stack application)
8. Backtracking
- Subsets / Combinations / Permutations (template problems)
- N-Queens (constraint satisfaction)
- Word Search (grid backtracking)
- Generate Parentheses (constraint backtracking)
9. Union-Find (Disjoint Set)
- Number of Connected Components
- Redundant Connection
- Accounts Merge (Union-Find + DFS)
10. Trie
- Implement Trie
- Word Search II (Trie + Backtracking — hard)
- Design Add and Search Words
Mid-Tier Product Companies: Pattern Focus
Mid-tier product companies (Flipkart, Atlassian, PhonePe, Razorpay, etc.) ask FAANG-like questions but at Medium difficulty. You rarely see Hard problems. The difference:
- Same patterns, lower difficulty: Two Pointers, Sliding Window, Binary Search, Trees, basic Graphs
- Less emphasis on: Advanced DP (2D DP is rare), Trie, Union-Find, complex graph algorithms
- More emphasis on: Practical application, clean code, basic system design from mid-level
What to Prioritize
Top Patterns (cover 85% of questions):
- Arrays + Hashing (frequency maps, prefix sums, two pointers)
- Binary Search (standard + on sorted arrays/matrices)
- Trees (traversals, LCA, BST operations, level-order)
- Linked Lists (reversal, cycle detection, merge operations)
- Stacks & Queues (parentheses, monotonic stack basics)
- Basic Graph (BFS/DFS on matrix, connected components, topological sort)
- 1D Dynamic Programming (climbing stairs, house robber, coin change, LIS)
- Sorting + Greedy (intervals, meeting rooms, job scheduling)
- Sliding Window (fixed and variable size)
- Heap (top-K problems, merge K sorted)
Problems that specifically appear at Indian product companies:
- Merge Intervals / Meeting Rooms (scheduling — Flipkart, Swiggy)
- LRU Cache (implementation — Razorpay, PhonePe)
- Stock Buy and Sell variants (DP — Groww, Zerodha)
- Rate Limiter design (practical — all fintech)
- Design Tiny URL (system design — all product companies)
Key Difference from FAANG Prep
- You need fewer Hard problems (focus 80% on Medium)
- Clean, readable code matters more (they often check code quality)
- System design starts at 2+ years (vs 3+ at FAANG)
- Behavioral round is shorter but still evaluated
- Speed matters — most give 30-45 min per round with 1-2 problems
Startups (Series A-C): What Actually Gets Asked
Startup interviews are COMPLETELY different from FAANG. Here's the reality:
Format Differences
- Take-home assignments (60% of startups use these instead of live coding)
- Practical coding (build a feature, debug existing code, review a PR)
- Pair programming (collaborative coding WITH the interviewer)
- System design discussion (even for junior roles — they need builders)
- Less algorithmic puzzles (founders care if you can ship, not if you can solve DP)
Patterns That Actually Matter at Startups
Tier 1 — Always useful (asked at 80%+ of startups):
- Hash Maps (data transformation, grouping, counting)
- Arrays (manipulation, filtering, transformation)
- String Processing (parsing, validation, formatting)
- Basic Sorting and Searching
- API Design (REST, request/response modeling)
Tier 2 — Occasionally asked (depends on domain):
- Trees (if the product has hierarchical data — file systems, org charts)
- BFS/DFS (if relevant to the domain — social networks, recommendations)
- Basic DP (if the startup does optimization — pricing, scheduling)
- Queue/Stack (for undo/redo, event processing)
Tier 3 — Rare (only at tech-heavy startups):
- Graph algorithms (for social/network startups)
- Sliding Window (for analytics/streaming startups)
What Startups Actually Test
Instead of "Solve this LeetCode Hard in 20 minutes," startups ask:
- "Here's a buggy function. Find and fix the issues." (debugging skill)
- "Build a simple REST API for [feature] in 60 minutes." (practical coding)
- "Review this PR — what concerns do you have?" (code review skill)
- "Design the database schema for [feature]." (practical design)
- "Given this CSV data, write a script to transform it into [format]." (data processing)
Startup Interview Prep Strategy
- Build things — A portfolio project demonstrates more than 500 LeetCode problems
- Know your stack deeply — If they use React, know React internals. If they use Go, know concurrency.
- Practice code reviews — Reading code is as important as writing it
- Basic DSA — Cover arrays, hashing, strings, basic sorting (2-3 weeks is enough)
- System design at practical level — Database schema, API design, caching basics
Service-Based Companies: Focused Preparation
Service companies (TCS, Infosys, Wipro, Cognizant, HCL, etc.) have high-volume hiring with standardized assessments. The interview is very different from product companies.
Format
- Online Assessment — 2-3 coding problems + MCQs (60-90 minutes)
- Technical Interview — 1 round covering fundamentals (30-45 min)
- HR Interview — Fitment, salary, location preference
Patterns Required (In Order of Frequency)
Must-Know (90%+ probability of appearing):
- Array manipulation — Reversal, rotation, sorting, searching, duplicates
- String operations — Palindrome check, anagram, pattern matching, reversal
- Sorting algorithms — Bubble sort, selection sort, merge sort, quick sort (know how they work)
- Searching — Linear search, binary search
- Basic math — Prime numbers, GCD, factorial, Fibonacci, number digit operations
- Pattern printing — Star patterns, number patterns, pyramid (yes, still asked in 2026)
Good to Know (50-70% probability):
- Linked Lists — Reversal, insertion, deletion, middle element, cycle detection
- Stack/Queue — Balanced parentheses, next greater element, queue using stacks
- Basic recursion — Factorial, Fibonacci, Tower of Hanoi, subset generation
- Hash Map basics — Frequency counting, first non-repeating character
- Basic tree operations — Traversals (inorder, preorder, postorder), height, leaf count
Occasionally Asked (20-40% probability):
- Greedy basics — Activity selection, fractional knapsack
- Basic DP — 0/1 knapsack, longest common subsequence (conceptual — rarely code from scratch)
- Graph basics — BFS, DFS (conceptual understanding, rarely full implementation)
- Bit manipulation — Count set bits, power of 2, XOR tricks
Service Company MCQ Topics (Don't Ignore These)
- OOP concepts (inheritance, polymorphism, abstraction, encapsulation)
- SQL queries (joins, group by, having, subqueries)
- OS basics (process vs thread, deadlock conditions, paging)
- Networking basics (OSI model, TCP vs UDP, HTTP methods)
- Time/space complexity identification (given code → tell complexity)
- Output prediction (given code → what's the output?)
Preparation Timeline for Service Companies
2-3 weeks is sufficient if you know basics:
- Week 1: Arrays, Strings, Sorting, Searching, Pattern printing, Basic math
- Week 2: Linked Lists, Stacks, Queues, Recursion, Basic Hashing
- Week 3: Practice mock assessments, MCQs, SQL, OOP concepts
The "Ladder Strategy" — Start Low, Climb Up
If you're currently at a service company targeting FAANG eventually:
Phase 1 (Months 1-2): Prepare for and clear a mid-tier product company (Flipkart, Atlassian, etc.)
- Gives you a stronger base, better work experience, higher salary
- Product company experience on resume improves FAANG callback rate by 3x
Phase 2 (Months 3-8 at new job): Work on real systems, gain distributed systems experience
- Apply patterns you learned in real production code
- Build something complex for your portfolio
Phase 3 (Months 9-14): Prepare for FAANG from a position of strength
- You now have product company experience + real systems knowledge
- FAANG prep is more natural because you've used these patterns in production
This ladder strategy has a 2.4x higher FAANG success rate than direct service→FAANG jumps.
Pattern Practice Order by Company Tier
If targeting FAANG (90-day order):
- Two Pointers + Sliding Window (Week 1-2)
- Hash Maps + Arrays (Week 2-3)
- Binary Search (Week 3-4)
- Trees — all traversals + BST (Week 4-5)
- Graphs — BFS/DFS/Topological Sort (Week 5-7)
- Dynamic Programming — 1D then 2D (Week 7-10)
- Heap + Stack patterns (Week 10-11)
- Backtracking + Union-Find + Trie (Week 11-12)
- Mock interviews + weak areas (Week 12-13)
If targeting Mid-Product (60-day order):
- Arrays + Hash Maps (Week 1-2)
- Two Pointers + Sliding Window + Binary Search (Week 2-3)
- Trees + Basic Graphs (Week 3-5)
- Linked Lists + Stacks (Week 5-6)
- 1D DP + Greedy (Week 6-7)
- Heap + Sorting (Week 7-8)
- Mock interviews (Week 8-9)
If targeting Startups (21-day order):
- Arrays + Strings + Hash Maps (Day 1-5)
- Sorting + Binary Search (Day 6-8)
- Basic Trees + Linked Lists (Day 9-12)
- Stack/Queue + Recursion (Day 13-15)
- Build a project + practice code reviews (Day 16-21)
If targeting Service Companies (14-day order):
- Arrays + Strings + Math + Patterns (Day 1-4)
- Sorting + Searching + Recursion (Day 5-7)
- Linked Lists + Stacks + Queues (Day 8-10)
- MCQs (OOP, SQL, OS, Networking) (Day 11-12)
- Mock assessments (Day 13-14)
Key Insight: Don't Over-Prepare for Your Target
The most common waste of time in DSA preparation:
- Studying advanced DP for a startup interview (they'll never ask it)
- Practicing Hard graph problems for service companies (you'll never see them)
- Ignoring communication practice for FAANG (it's 30-40% of your score)
- Skipping system design for product companies (it's a separate elimination round)
Match your preparation to your target. Focused preparation beats broad preparation every time.
Frequently Asked Questions
What DSA topics should I study for FAANG interviews?
For FAANG, you need deep mastery of: Two Pointers, Sliding Window, Binary Search (including on answer space), Trees (BFS/DFS), Graphs (traversal, topological sort, shortest path), Dynamic Programming (1D and 2D), Heap/Priority Queue, Monotonic Stack, Backtracking, Union-Find, and Trie. Focus 60% on Medium problems and 20% on Hard. You need 200-300 well-understood problems over 4-6 months.
Is Dynamic Programming required for product-based company interviews?
For mid-tier product companies (Flipkart, Atlassian, Razorpay), 1D DP is sufficient — problems like climbing stairs, house robber, coin change, and longest increasing subsequence. 2D DP (edit distance, LCS) is rarely asked. For FAANG, both 1D and 2D DP are required. For startups and service companies, DP is almost never asked in interviews.
How many LeetCode problems are enough for startup interviews?
For startup interviews, 50-80 problems focused on arrays, strings, hashing, and basic sorting/searching is sufficient. Startups prioritize practical coding skills (building features, debugging, code reviews) over algorithmic puzzles. Spending 2-3 weeks on DSA basics and then focusing on a strong portfolio project is the optimal strategy for startups.
What coding topics are asked in TCS, Infosys, and Wipro interviews?
Service companies focus on: array manipulation, string operations, sorting algorithms (know how bubble/merge/quick sort work), basic math (prime numbers, GCD, Fibonacci), pattern printing, linked list operations, and stack/queue basics. Also prepare MCQs on OOP concepts, SQL queries, OS basics, and networking fundamentals. 60-100 Easy-Medium problems over 2-3 weeks is sufficient.
Can I directly go from a service company to FAANG?
Yes, but the "ladder strategy" has 2.4x higher success rate: first move to a mid-tier product company (2-4 months preparation), gain 1-2 years of product experience, then target FAANG (4-6 months additional preparation). Direct jumps are harder because: (1) FAANG callback rate is lower without product company experience, (2) system design knowledge is harder to build without exposure to real distributed systems.
Which DSA patterns have the highest ROI across all company tiers?
The patterns with highest return-on-investment across ALL company types are: Hash Maps (asked everywhere from service to FAANG), Arrays/Two Pointers (universal), Binary Search (universal for sorted data), and basic Tree traversals. If you only have 2 weeks, master these four. They cover 50-60% of interview questions at every company tier.