DSA Notes
Company-specific DSA patterns for Amazon, Google, Meta, Apple, and Microsoft with 50+ curated problems organized by difficulty and category.
Company-Specific Patterns
Each FAANG company has distinct interviewing patterns based on their products, engineering culture, and what their teams work on daily. Understanding these patterns helps you prioritize your preparation.
Amazon Patterns
Focus areas: Trees, Graphs, BFS/DFS, Object-Oriented Design, Arrays
Amazon builds massive distributed systems, so they love problems involving tree/graph traversals (representing hierarchies, networks) and system design thinking. Their Leadership Principles also influence behavioral questions heavily.
Amazon Top Problems:
| # | Problem | Difficulty | Category |
|---|---|---|---|
| 1 | Number of Islands | Medium | Graph/BFS |
| 2 | Rotting Oranges | Medium | BFS |
| 3 | Course Schedule | Medium | Topological Sort |
| 4 | Binary Tree Level Order Traversal | Medium | Tree/BFS |
| 5 | Lowest Common Ancestor | Medium | Tree |
| 6 | Word Ladder | Hard | BFS |
| 7 | Merge K Sorted Lists | Hard | Heap |
| 8 | LRU Cache | Medium | Design |
| 9 | Two Sum | Easy | Hash Map |
| 10 | Trapping Rain Water | Hard | Two Pointers |
| 11 | Maximum Subarray | Medium | DP/Kadane |
| 12 | Reorder Data in Log Files | Medium | Custom Sort |
Amazon Tips:
- Practice BFS variations extensively — multi-source BFS, shortest path in unweighted graphs
- Know your tree traversals cold (pre/in/post order, level order)
- Be prepared to design classes (OOP) as part of coding questions
Google Patterns
Focus areas: Dynamic Programming, Math/Number Theory, String Algorithms, Advanced Graphs
Google values mathematical thinking and optimization. Their problems tend to require clever observations and non-obvious DP formulations. Expect harder problems overall.
Google Top Problems:
| # | Problem | Difficulty | Category |
|---|---|---|---|
| 1 | Longest Increasing Subsequence | Medium | DP |
| 2 | Word Break | Medium | DP |
| 3 | Decode Ways | Medium | DP |
| 4 | Regular Expression Matching | Hard | DP |
| 5 | Median of Two Sorted Arrays | Hard | Binary Search |
| 6 | Longest Valid Parentheses | Hard | Stack/DP |
| 7 | Count of Smaller Numbers After Self | Hard | Merge Sort |
| 8 | Alien Dictionary | Hard | Topological Sort |
| 9 | Split Array Largest Sum | Hard | Binary Search |
| 10 | Minimum Window Substring | Hard | Sliding Window |
| 11 | Serialize and Deserialize Binary Tree | Hard | Tree/DFS |
| 12 | Candy | Hard | Greedy |
Google Tips:
- Master DP on strings (edit distance, regex matching, word break)
- Practice binary search on answer problems
- Be comfortable with math-heavy problems (combinatorics, number theory)
- Google often asks follow-up questions that increase complexity
Meta (Facebook) Patterns
Focus areas: Arrays, Strings, Binary Search, Intervals, Medium-difficulty Breadth
Meta interviews tend to have 2 questions per 45-minute session (unlike Google's 1 hard). This means problems are medium difficulty but you need speed. Arrays and strings dominate.
Meta Top Problems:
| # | Problem | Difficulty | Category |
|---|---|---|---|
| 1 | Valid Palindrome II | Easy | Two Pointers |
| 2 | Move Zeroes | Easy | Two Pointers |
| 3 | Merge Intervals | Medium | Intervals |
| 4 | Subarray Sum Equals K | Medium | Prefix Sum |
| 5 | Product of Array Except Self | Medium | Arrays |
| 6 | Random Pick with Weight | Medium | Binary Search |
| 7 | Add Binary | Easy | Strings |
| 8 | Vertical Order Traversal | Hard | Tree/Sort |
| 9 | Binary Tree Right Side View | Medium | BFS |
| 10 | Lowest Common Ancestor (General) | Medium | Tree |
| 11 | Accounts Merge | Medium | Union Find |
| 12 | Buildings With an Ocean View | Medium | Stack |
Meta Tips:
- Speed matters — practice solving mediums in 15-20 minutes
- Know interval problems inside and out
- Binary search variations appear frequently
- String manipulation is tested more often than at other companies
Apple Patterns
Focus areas: Arrays, Sorting, Two Pointers, Linked Lists, Clean Code
Apple emphasizes code quality and readability. They may ask you to refactor or optimize existing code. Problems tend toward medium difficulty with emphasis on clean implementation.
Apple Top Problems:
| # | Problem | Difficulty | Category |
|---|---|---|---|
| 1 | 3Sum | Medium | Two Pointers |
| 2 | Valid Parentheses | Easy | Stack |
| 3 | Merge Two Sorted Lists | Easy | Linked List |
| 4 | Container With Most Water | Medium | Two Pointers |
| 5 | Letter Combinations of Phone Number | Medium | Backtracking |
| 6 | Spiral Matrix | Medium | Arrays |
| 7 | Rotate Image | Medium | Matrix |
| 8 | Find Peak Element | Medium | Binary Search |
| 9 | Clone Graph | Medium | Graph/DFS |
| 10 | Top K Frequent Elements | Medium | Heap |
Apple Tips:
- Write clean, well-structured code with proper naming
- Be prepared to handle follow-ups about edge cases
- They value system design discussion even in coding rounds
Microsoft Patterns
Focus areas: Well-rounded (Arrays, Trees, Strings, DP, Graphs)
Microsoft interviews are the most balanced — no single category dominates. They test breadth of knowledge across all DSA topics at medium difficulty.
Microsoft Top Problems:
| # | Problem | Difficulty | Category |
|---|---|---|---|
| 1 | Reverse Linked List | Easy | Linked List |
| 2 | Maximum Depth of Binary Tree | Easy | Tree |
| 3 | Valid BST | Medium | Tree |
| 4 | Group Anagrams | Medium | Hash Map |
| 5 | Longest Substring Without Repeats | Medium | Sliding Window |
| 6 | Coin Change | Medium | DP |
| 7 | Number of Islands | Medium | Graph |
| 8 | String to Integer (atoi) | Medium | String Parsing |
| 9 | Reverse Words in String | Medium | String |
| 10 | Excel Sheet Column Title | Easy | Math |
Microsoft Tips:
- Be well-rounded — do not over-specialize
- They ask design questions (design a parking lot, design an elevator)
- String parsing problems are more common here than at other companies
Study Plan: 4-Week FAANG Preparation
Week 1: Foundations
- Complete all Easy problems from your target company's list
- Review: Arrays, Strings, Hash Maps, Two Pointers
- Daily: 3 problems (1 Easy, 2 Medium)
Week 2: Core Patterns
- Medium problems: Trees, Graphs, BFS/DFS
- Begin DP (1D problems: climbing stairs, coin change, house robber)
- Daily: 2-3 Medium problems
Week 3: Advanced + Company-Specific
- Hard problems from your target company
- Advanced DP, Heap problems, Sliding Window
- Start mock interviews (Pramp, interviewing.io)
- Daily: 1-2 Hard problems + 1 Medium
Week 4: Mock + Review
- Full mock interviews (timed, with communication practice)
- Re-solve problems you struggled with from weeks 1-3
- Review your notes on patterns and key insights
- Rest the day before your interview
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for FAANG DSA Sheet: Company-Specific Patterns and Problems.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Data Structures & Algorithms topic.
Search Terms
data-structures-algorithms, data structures & algorithms, data, structures, algorithms, interview, preparation, faang
Related Data Structures & Algorithms Topics