FAANG Coding Interview Questions - 2025 Edition
Your star helps keep this collection updated with fresh interview questions. Follow for notifications on new resources that could help you land your dream tech job.
🚨 NEW: NeetCode 150 & Blind 75 Essential Problems + System Design Guide and Latest FAANG Questions! 🚨
A curated collection of coding and system design questions asked at top tech companies. Helping you ace your next interview!
🎯 Essential Interview Preparation Resources
🔥 Top Problem Collections
🏢 Company-Specific Questions
🤖 AI & Machine Learning Resources
💻 Programming Resources
Table of Contents
| SNo. | Contents | | ---- | -------- | | 1. | FAANG Must Do Problems | | 2. | Amazon | | 3. | Microsoft | | 4. | Meta (Facebook) | | 5. | Google Top 50 | | 6. | Google | | 7. | LinkedIn | | 8. | Flipkart | | 9. | Netflix | | 10. | OpenAI | | 11. | Databricks | | 12. | Machine Learning & AI Resources |
🚀 Quick Start Guide
🎯 **Beginner Track** (0-3 months)
📈 **Intermediate Track** (1-6 months)
🎖️ **Advanced Track** (Targeting specific roles)
FAANG Must Do Problems
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | Two Sum | Easy | O(n) | O(n) | | 2 | Longest Substring Without Repeating Characters | Medium | O(n) | O(min(m,n)) | | 3 | Longest Palindromic Substring | Medium | O(n²) | O(1) | | 4 | Container With Most Water | Medium | O(n) | O(1) | | 5 | 3Sum | Medium | O(n²) | O(1) | | 6 | Remove Nth Node From End of List | Medium | O(n) | O(1) | | 7 | Valid Parentheses | Easy | O(n) | O(n) | | 8 | Merge Two Sorted Lists | Easy | O(n+m) | O(1) | | 9 | Merge k Sorted Lists | Hard | O(n log k) | O(1) | | 10 | Search in Rotated Sorted Array | Medium | O(log n) | O(1) | | 11 | Combination Sum | Medium | O(2ⁿ) | O(n) | | 12 | Rotate Image | Medium | O(n²) | O(1) | | 13 | Group Anagrams | Medium | O(n k log k) | O(n k) | | 14 | Maximum Subarray | Easy | O(n) | O(1) | | 15 | Spiral Matrix | Medium | O(m×n) | O(1) | | 16 | Jump Game | Medium | O(n) | O(1) | | 17 | Merge Intervals | Medium | O(n log n) | O(n) | | 18 | Insert Interval | Medium | O(n) | O(n) | | 19 | Unique Paths | Medium | O(m×n) | O(m×n) | | 20 | Climbing Stairs | Easy | O(n) | O(1) | | 21 | Set Matrix Zeroes | Medium | O(m×n) | O(1) | | 22 | Minimum Window Substring | Hard | O(n) | O(k) | | 23 | Word Search | Medium | O(m×n×4ᵏ) | O(k) | | 24 | Decode Ways | Medium | O(n) | O(n) | | 25 | Validate Binary Search Tree | Medium | O(n) | O(h) | | 26 | Same Tree | Easy | O(n) | O(h) | | 27 | Binary Tree Level Order Traversal | Medium | O(n) | O(n) | | 28 | Maximum Depth of Binary Tree | Easy | O(n) | O(h) | | 29 | Construct Binary Tree from Preorder and Inorder Traversal | Medium | O(n) | O(n) | | 30 | Best Time to Buy and Sell Stock | Easy | O(n) | O(1) |
Amazon
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | Two Sum | Easy | O(n) | O(n) | | 2 | Add Two Numbers | Medium | O(max(m,n)) | O(max(m,n)) | | 3 | Longest Substring Without Repeating Characters | Medium | O(n) | O(min(m,n)) | | 4 | Median of Two Sorted Arrays | Hard | O(log(min(m,n))) | O(1) | | 5 | Longest Palindromic Substring | Medium | O(n²) | O(1) | | 6 | ZigZag Conversion | Medium | O(n) | O(n) | | 7 | String to Integer (atoi) | Medium | O(n) | O(1) | | 8 | 3Sum | Medium | O(n²) | O(1) or O(n) | | 9 | Letter Combinations of a Phone Number | Medium | O(4ⁿ) | O(n) | | 10 | Valid Parentheses | Easy | O(n) | O(n) |
Microsoft
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | Two Sum | Easy | O(n) | O(n) | | 2 | Add Two Numbers | Medium | O(max(m,n)) | O(max(m,n)) | | 3 | Median of Two Sorted Arrays | Hard | O(log(min(m,n))) | O(1) | | 4 | Longest Palindromic Substring | Medium | O(n²) | O(1) | | 5 | String to Integer (atoi) | Medium | O(n) | O(1) | | 6 | Roman to Integer | Easy | O(n) | O(1) | | 7 | 3Sum | Medium | O(n²) | O(1) or O(n) | | 8 | Valid Parentheses | Easy | O(n) | O(n) | | 9 | Merge Two Sorted Lists | Easy | O(n+m) | O(1) | | 10 | Merge k Sorted Lists | Hard | O(n log k) | O(1) |
Meta (Facebook)
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | Regular Expression Matching | Hard | O(m×n) | O(m×n) | | 2 | Roman to Integer | Easy | O(n) | O(1) | | 3 | 3Sum | Medium | O(n²) | O(1) or O(n) | | 4 | Letter Combinations of a Phone Number | Medium | O(4ⁿ) | O(n) | | 5 | Valid Parentheses | Easy | O(n) | O(n) | | 6 | Merge k Sorted Lists | Hard | O(n log k) | O(1) | | 7 | Reverse Nodes in k-Group | Hard | O(n) | O(1) | | 8 | Remove Duplicates from Sorted Array | Easy | O(n) | O(1) | | 9 | Implement strStr() | Easy | O(n×m) | O(1) | | 10 | Search in Rotated Sorted Array | Medium | O(log n) | O(1) |
Google Top 50
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | Two Sum | Easy | O(n) | O(n) | | 2 | Insert Interval | Medium | O(n) | O(n) | | 3 | Text Justification | Hard | O(n) | O(n) | | 4 | Minimum Window Substring | Hard | O(n) | O(k) | | 5 | Maximal Rectangle | Hard | O(m×n) | O(n) | | 6 | The Skyline Problem | Hard | O(n log n) | O(n) | | 7 | Maximal Square | Medium | O(m×n) | O(m×n) | | 8 | Find Median from Data Stream | Hard | O(log n) insert, O(1) find | O(n) | | 9 | Bulls and Cows | Medium | O(n) | O(1) | | 10 | Count of Smaller Numbers After Self | Hard | O(n log n) | O(n) |
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | Two Sum | Easy | O(n) | O(n) | | 2 | Insert Interval | Medium | O(n) | O(n) | | 3 | Text Justification | Hard | O(n) | O(n) | | 4 | Minimum Window Substring | Hard | O(n) | O(k) | | 5 | Maximal Rectangle | Hard | O(m×n) | O(n) | | 6 | The Skyline Problem | Hard | O(n log n) | O(n) | | 7 | Maximal Square | Medium | O(m×n) | O(m×n) | | 8 | Find Median from Data Stream | Hard | O(log n) insert, O(1) find | O(n) | | 9 | Bulls and Cows | Medium | O(n) | O(1) | | 10 | Count of Smaller Numbers After Self | Hard | O(n log n) | O(n) |
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | Nested List Weight Sum II | Medium | O(n) | O(n) | | 2 | Shortest Word Distance II | Medium | O(n) | O(n) | | 3 | Closest Binary Search Tree Value II | Medium | O(n) | O(n) | | 4 | Two Sum III - Data structure design | Easy | O(n) | O(n) | | 5 | Nested List Weight Sum | Medium | O(n) | O(n) | | 6 | Max Stack | Medium | O(n) | O(n) | | 7 | Find Leaves of Binary Tree | Medium | O(n) | O(n) | | 8 | All O'one Data Structure | Hard | O(1) for each operation | O(n) | | 9 | Can Place Flowers | Easy | O(n) | O(1) | | 10 | Factor Combinations | Medium | O(2ⁿ) | O(n) | | 11 | Paint House | Medium | O(n) | O(1) | | 12 | Paint House II | Hard | O(n×k) | O(n) | | 13 | Evaluate Reverse Polish Notation | Medium | O(n) | O(n) | | 14 | Shortest Word Distance | Easy | O(n) | O(1) | | 15 | Text Justification | Hard | O(n) | O(n) | | 16 | Count Different Palindromic Subsequences | Hard | O(n²) | O(n²) | | 17 | Binary Tree Upside Down | Medium | O(n) | O(n) | | 18 | Max Points on a Line | Hard | O(n²) | O(n) | | 19 | Partition to K Equal Sum Subsets | Hard | O(n×2^n) | O(n) | | 20 | Insert Delete GetRandom O(1) | Medium | O(1) for each operation | O(n) | | 21 | Number of Islands | Medium | O(m×n) | O(m×n) | | 22 | Exclusive Time of Functions | Medium | O(n) | O(n) | | 23 | Valid Triangle Number | Medium | O(n²) | O(1) | | 24 | Valid Number | Medium | O(n) | O(1) | | 25 | Repeated DNA Sequences | Medium | O(n) | O(n) |
Flipkart
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | Add Two Numbers | Medium | O(max(m,n)) | O(max(m,n)) |
Netflix
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | | --- | ------- | ---------- | --------------- | ---------------- | | 1 | LRU Cache | Medium | O(1) for each operation | O(n) | | 2 | Department Top Three Salaries | Hard | O(n log k) | O(n) |
OpenAI
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | Notes | | --- | ------- | ---------- | --------------- | ---------------- | ----- | | 1 | LRU Cache | Medium | O(1) | O(capacity) | System design classic | | 2 | Time Based Key-Value Store | Medium | O(log n) | O(n) | Practical data structure | | 3 | Design Search Autocomplete System | Hard | O(p + q log q) | O(n) | Real-world system | | 4 | Implement Trie (Prefix Tree) | Medium | O(m) | O(ALPHABET_SIZE×N×M) | NLP applications | | 5 | Word Search II | Hard | O(m×n×4^s) | O(n) | Advanced trie usage | | 6 | Serialize and Deserialize Binary Tree | Hard | O(n) | O(n) | Data persistence | | 7 | Design In-Memory File System | Hard | O(m + k log k) | O(n) | Unix cd simulation | | 8 | LFU Cache | Hard | O(1) | O(capacity) | Advanced caching | | 9 | Design Twitter | Medium | O(n log n) | O(n) | Social media system | | 10 | Top K Frequent Elements | Medium | O(n log k) | O(n + k) | ML preprocessing | | 11 | K Closest Points to Origin | Medium | O(n log k) | O(k) | ML algorithms | | 12 | Merge k Sorted Lists | Hard | O(n log k) | O(1) | Distributed systems | | 13 | Course Schedule II | Medium | O(V + E) | O(V + E) | Dependency resolution | | 14 | Word Ladder | Hard | O(M²×N) | O(M²×N) | NLP transformations | | 15 | Minimum Window Substring | Hard | O(|s| + |t|) | O(|s| + |t|) | String processing | | 16 | Design Hit Counter | Medium | O(1) amortized | O(1) | Rate limiting | | 17 | Design Log Storage System | Medium | O(n) | O(n) | System monitoring | | 18 | Valid Parentheses | Easy | O(n) | O(n) | Code parsing | | 19 | Longest Increasing Path in a Matrix | Hard | O(m×n) | O(m×n) | DP optimization | | 20 | Maximum Subarray | Medium | O(n) | O(1) | ML loss functions |
Databricks
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity | Notes | | --- | ------- | ---------- | --------------- | ---------------- | ----- | | 1 | Binary Search | Easy | O(log n) | O(1) | Core algorithm | | 2 | Search Insert Position | Easy | O(log n) | O(1) | Binary search variant | | 3 | Find Peak Element | Medium | O(log n) | O(1) | Binary search on unsorted | | 4 | Search in Rotated Sorted Array | Medium | O(log n) | O(1) | Modified binary search | | 5 | Find Minimum in Rotated Sorted Array | Medium | O(log n) | O(1) | Rotation point | | 6 | Search a 2D Matrix | Medium | O(log(m*n)) | O(1) | 2D binary search | | 7 | Median of Two Sorted Arrays | Hard | O(log(min(m,n))) | O(1) | Advanced binary search | | 8 | Shortest Path in Binary Matrix | Medium | O(n²) | O(n²) | BFS shortest path | | 9 | Number of Islands | Medium | O(m×n) | O(m×n) | DFS/BFS | | 10 | Word Ladder | Hard | O(M²×N) | O(M²×N) | BFS word transformation | | 11 | Course Schedule | Medium | O(V+E) | O(V+E) | Topological sort | | 12 | Course Schedule II | Medium | O(V+E) | O(V+E) | Topological ordering | | 13 | Alien Dictionary | Hard | O(C) | O(1) | Topological sort | | 14 | Valid IP Addresses | Medium | O(3^4) | O(1) | IP validation | | 15 | LRU Cache | Medium | O(1) | O(capacity) | Data structure design | | 16 | Implement Trie (Prefix Tree) | Medium | O(m) | O(26×N×M) | Trie data structure | | 17 | Design Hit Counter | Medium | O(1) amortized | O(1) | Time series design | | 18 | Logger Rate Limiter | Easy | O(1) | O(M) | Rate limiting | | 19 | Print in Order | Easy | O(1) | O(1) | Concurrency | | 20 | Print FooBar Alternately | Medium | O(n) | O(1) | Concurrency/Threading |
About This Repository
The ultimate collection for technical interview success! This repository provides comprehensive coverage of:
Perfect for FAANG, unicorns, and top tech interviews!
System Design Interview Questions
📚 Complete System Design Interview Guide - Top 25 system design problems with complexity ratings and company tags.
Contributing
Contributions are welcome! Please feel free to submit a pull request.
Connect With Me
If you found this repository helpful, please consider following me:
I regularly share tech interview preparation resources, coding tips, and career advice for developers aiming for top tech companies. Your support means a lot! ⭐
If you found this resource helpful, give it a ⭐ and share it with others!
License
This project is licensed under the GPL-3.0 license - see the LICENSE file for details.
A curated collection of coding interview questions and solutions commonly asked at top tech companies (FAANG and others). This repository includes problems on arrays, strings, linked lists, trees, dynamic programming, bit manipulation and more — with well‑explained answers to help you practice and prepare for technical interviews in software engineering.