Coding Interview: Top 50 Most Asked Problems by Company — Google, Amazon, Meta, Apple, Microsoft, Blind 75

Knowing which problems are most frequently asked at each company gives you a significant preparation advantage. This guide compiles the top problems by company based on interview data, organized by pattern. Focus your practice on these high-frequency problems, especially for the companies you are interviewing with.

Google: Algorithm-Heavy, Code Quality Matters

Google emphasizes algorithmic thinking and clean code. Common patterns: BFS/DFS on grids, dynamic programming, and binary search on answer. Top problems: (1) Word Ladder (BFS transformation). (2) Course Schedule / Course Schedule II (topological sort). (3) Sliding Window Maximum (monotonic deque). (4) Merge K Sorted Lists (heap). (5) Koko Eating Bananas (binary search on answer). (6) Number of Islands (DFS/BFS flood fill). (7) Serialize/Deserialize Binary Tree (pre-order + null markers). (8) Longest Increasing Subsequence (DP + binary search O(N log N)). (9) Word Search II (trie + DFS backtracking). (10) Median from Data Stream (two heaps). Google-specific tips: code must compile and run. The interviewer may ask you to code in a Google Doc (no IDE, no autocomplete). Practice writing syntactically correct code without an editor. Google values code clarity — meaningful variable names, clean structure, no redundant code. They often ask follow-up questions: “What if the input is too large to fit in memory?” “How would you distribute this?” Be prepared to extend your solution.

Amazon: Leadership Principles + Coding

Amazon codes in an online IDE (typically HackerRank or their own tool). Problems tend to be more practical and less theoretical than Google. Top problems: (1) Two Sum (hash map). (2) LRU Cache (hash map + doubly linked list). (3) Merge Intervals (sort + linear scan). (4) Number of Islands (flood fill). (5) K Closest Points to Origin (heap or quickselect). (6) Product of Array Except Self (prefix/suffix products). (7) Reorder Data in Log Files (custom sort). (8) Search in Rotated Sorted Array (binary search). (9) Longest Palindromic Substring (expand around center). (10) Min Cost to Connect All Points (MST). Amazon-specific: every coding interview starts with a behavioral question (15 minutes). Prepare 8-10 STAR stories mapped to Leadership Principles (Customer Obsession, Ownership, Dive Deep, Bias for Action, Disagree and Commit). The coding portion is 30 minutes for 1-2 problems. Speed matters — practice solving medium problems in 15-20 minutes. Amazon values working code over perfect code. A brute-force solution that works is better than an optimal solution with bugs.

Meta (Facebook): Speed and Two Problems

Meta typically gives 2 medium problems in a 45-minute coding round. You must solve both — one is not enough. Top problems: (1) Valid Palindrome II (two pointers with one skip). (2) Random Pick with Weight (prefix sum + binary search). (3) Minimum Remove to Make Valid Parentheses (stack). (4) Lowest Common Ancestor of Binary Tree (recursive DFS). (5) Binary Tree Vertical Order Traversal (BFS + column tracking). (6) Subarray Sum Equals K (prefix sum + hash map). (7) Range Sum of BST (recursive traversal with range pruning). (8) Dot Product of Two Sparse Vectors (hash map or two pointers). (9) Nested List Weight Sum (DFS with depth tracking). (10) Buildings With an Ocean View (scan right to left, track max). Meta-specific: practice speed. You should be able to solve a medium problem in 15-20 minutes including explaining your approach, coding, and testing. The interviewer evaluates: problem understanding (asking clarifying questions), approach (explaining before coding), implementation (clean, bug-free code), and testing (walking through examples, edge cases). Meta uses a shared coding environment (CoderPad or similar) — practice coding while talking.

Apple: Practical and System-Aware

Apple interviews mix coding with practical system knowledge. Problems tend to be medium difficulty with system-level follow-ups. Top problems: (1) Three Sum (sort + two pointers). (2) Roman to Integer (mapping + scan). (3) Spiral Matrix (boundary traversal). (4) Flatten Nested List Iterator (stack of iterators). (5) Design Add and Search Words Data Structure (trie with wildcard DFS). (6) Word Break (DP). (7) Implement Stack using Queues. (8) Reverse Linked List (iterative). (9) Validate Binary Search Tree (in-order or range propagation). (10) Maximum Depth of Binary Tree (recursive DFS). Apple-specific: Apple values people who think about the full picture. After solving, the interviewer may ask: “How would this work on a device with limited memory?” “What if this runs on millions of devices concurrently?” Apple focuses on: code correctness, handling edge cases, and awareness of performance on real hardware. The culture fit interview is important — Apple looks for collaboration, passion for products, and attention to detail.

Microsoft: Breadth and Fundamentals

Microsoft tests breadth: data structures, algorithms, system design, and behavioral. Coding problems are typically medium difficulty. Top problems: (1) Two Sum (hash map). (2) Add Two Numbers (linked list arithmetic). (3) Reverse Linked List (iterative/recursive). (4) Valid Parentheses (stack). (5) Merge Two Sorted Lists (two pointers). (6) Binary Tree Level Order Traversal (BFS). (7) Maximal Square (DP). (8) Longest Substring Without Repeating Characters (sliding window). (9) Group Anagrams (hash map with sorted key). (10) Min Stack (auxiliary stack tracking minimum). Microsoft-specific: Microsoft uses a whiteboard (in-person) or shared document (virtual). They test fundamentals thoroughly — expect questions on time/space complexity, why you chose a specific data structure, and alternative approaches. Microsoft values clear communication and the ability to explain tradeoffs. The “design” round at Microsoft is often a mix of OOP design and system design — be prepared for both. Microsoft hires across many teams — the interviewer may specialize in different areas (Azure, Office, Windows), so the questions may have a practical bent related to their domain.

The Blind 75 / NeetCode 150 Priority

If you have limited time, prioritize the Blind 75 list (the most impactful 75 problems across all patterns). The NeetCode 150 extends this with additional problems per pattern. Priority order for maximum coverage: Week 1 (Arrays + Hashing): Two Sum, Contains Duplicate, Group Anagrams, Top K Frequent, Product Except Self, Valid Anagram, Longest Consecutive. Week 2 (Two Pointers + Sliding Window + Stack): Valid Palindrome, 3Sum, Container With Most Water, Best Time Buy Sell Stock, Longest Without Repeating, Valid Parentheses, Min Stack. Week 3 (Binary Search + Linked List + Trees): Search Rotated Array, Koko Eating Bananas, Reverse Linked List, Merge Two Sorted, LRU Cache, Invert Binary Tree, Max Depth, Level Order, Validate BST, Lowest Common Ancestor. Week 4 (Graphs + DP + Heap + Backtracking): Number of Islands, Course Schedule, Word Ladder, Climbing Stairs, Coin Change, Longest Increasing Subsequence, Word Break, Kth Largest, Merge K Sorted, Subsets, Permutations, Combination Sum. This covers all 15 patterns with the highest-frequency problems. Solve each in under 25 minutes with clean code and clear complexity analysis.

{“@context”:”https://schema.org”,”@type”:”FAQPage”,”mainEntity”:[{“@type”:”Question”,”name”:”What are the most frequently asked coding problems at Google, Amazon, and Meta?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Google (algorithm-heavy): Word Ladder (BFS), Course Schedule (topological sort), Sliding Window Maximum (monotonic deque), Merge K Lists (heap), Koko Eating Bananas (binary search on answer), Number of Islands, LIS, Word Search II (trie+DFS), Median from Stream (two heaps). Google values clean code that compiles. Amazon (practical + behavioral): Two Sum, LRU Cache, Merge Intervals, Number of Islands, K Closest Points (heap), Product Except Self, Search Rotated Array. Every round starts with a 15-min behavioral question. Speed matters — solve mediums in 15-20 min. Meta (speed, 2 problems in 45 min): Valid Palindrome II, Random Pick with Weight, Minimum Remove Parentheses, LCA Binary Tree, Vertical Order Traversal, Subarray Sum Equals K. Practice solving mediums in 15-20 minutes including explanation and testing.”}},{“@type”:”Question”,”name”:”What is the most efficient order to practice the Blind 75 problems?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Prioritize by pattern coverage: Week 1 (Arrays + Hashing): Two Sum, Contains Duplicate, Group Anagrams, Top K Frequent, Product Except Self, Longest Consecutive. Week 2 (Two Pointers + Sliding Window + Stack): Valid Palindrome, 3Sum, Container With Most Water, Best Time Buy Sell, Longest Without Repeating, Valid Parentheses, Min Stack. Week 3 (Binary Search + Linked List + Trees): Search Rotated Array, Reverse Linked List, LRU Cache, Invert Binary Tree, Max Depth, Validate BST, LCA. Week 4 (Graphs + DP + Heap + Backtracking): Number of Islands, Course Schedule, Climbing Stairs, Coin Change, LIS, Word Break, Kth Largest, Merge K Lists, Subsets, Permutations. This covers all 15 patterns with highest-frequency problems. Target: each in under 25 minutes with clean code and complexity analysis.”}}]}
Scroll to Top