https://github.com/ombharatiya/FAANG-Coding-Interview-Questions
A curated List of Coding Questions Asked in FAANG Interviews
https://github.com/ombharatiya/FAANG-Coding-Interview-Questions
algorithms algorithms-and-data-structures codechef coding coding-interviews cpp data-structures hacktoberfest interview interview-questions interviewbit java leetcode python
Last synced: 17 days ago
JSON representation
A curated List of Coding Questions Asked in FAANG Interviews
- Host: GitHub
- URL: https://github.com/ombharatiya/FAANG-Coding-Interview-Questions
- Owner: ombharatiya
- License: gpl-3.0
- Created: 2020-10-27T17:48:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-18T23:24:37.000Z (28 days ago)
- Last Synced: 2025-03-18T23:28:06.343Z (28 days ago)
- Topics: algorithms, algorithms-and-data-structures, codechef, coding, coding-interviews, cpp, data-structures, hacktoberfest, interview, interview-questions, interviewbit, java, leetcode, python
- Homepage:
- Size: 228 KB
- Stars: 2,903
- Watchers: 52
- Forks: 812
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github - FAANG-Coding-Interview-Questions
README
# FAANG Coding Interview Preparation
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: Check out System Design Interview Guide and Most Recently Asked FAANG Questions including OpenAI and Tesla! đ¨
A curated collection of coding and system design questions asked at top tech companies. Helping you ace your next interview!
## Resources
- [Top 75 LeetCode Questions to Crack The Coding Interviews](./TopLeetCodeProblems.md)
- [Python Programming Language Resources to Learn](./PythonResources.md)
- [Most Recently Asked Questions at FAANG and other top companies](./FAANG-Recent-Questions.md)
- [System Design Interview Guide](./SYSTEM_DESIGN_INTERVIEW.md)
- [LLM Papers Cheatsheet for Beginners and Experts - Essential Research Papers for LLMs](./LLM_PAPERS_CHEATSHEET.md)
- [Complete Machine Learning Interview Preparation Guide for Beginners to Experts](./ML_INTERVIEW_PREP.md)## Table of Contents
| SNo. | Contents |
| ---- | -------- |
| 1. | [FAANG Must Do Problems](#faang-must-do-problems) |
| 2. | [Amazon](#amazon) |
| 3. | [Microsoft](#microsoft) |
| 4. | [Facebook](#facebook) |
| 5. | [Google Top 50](#google-top-50) |
| 6. | [Google](#google) |
| 7. | [LinkedIn](#linkedin) |
| 8. | [Flipkart](#flipkart) |
| 9. | [Netflix](#netflix) |
| 10. | [Machine Learning & AI Resources](#resources) |## FAANG Must Do Problems
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity |
| --- | ------- | ---------- | --------------- | ---------------- |
| 1 | [Two Sum](https://leetcode.com/problems/two-sum) | Easy | O(n) | O(n) |
| 2 | [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters) | Medium | O(n) | O(min(m,n)) |
| 3 | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring) | Medium | O(n²) | O(1) |
| 4 | [Container With Most Water](https://leetcode.com/problems/container-with-most-water) | Medium | O(n) | O(1) |
| 5 | [3Sum](https://leetcode.com/problems/3sum) | Medium | O(n²) | O(1) |
| 6 | [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list) | Medium | O(n) | O(1) |
| 7 | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses) | Easy | O(n) | O(n) |
| 8 | [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists) | Easy | O(n+m) | O(1) |
| 9 | [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists) | Hard | O(n log k) | O(1) |
| 10 | [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array) | Medium | O(log n) | O(1) |
| 11 | [Combination Sum](https://leetcode.com/problems/combination-sum) | Medium | O(2âż) | O(n) |
| 12 | [Rotate Image](https://leetcode.com/problems/rotate-image) | Medium | O(n²) | O(1) |
| 13 | [Group Anagrams](https://leetcode.com/problems/group-anagrams) | Medium | O(n k log k) | O(n k) |
| 14 | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray) | Easy | O(n) | O(1) |
| 15 | [Spiral Matrix](https://leetcode.com/problems/spiral-matrix) | Medium | O(mĂn) | O(1) |
| 16 | [Jump Game](https://leetcode.com/problems/jump-game) | Medium | O(n) | O(1) |
| 17 | [Merge Intervals](https://leetcode.com/problems/merge-intervals) | Medium | O(n log n) | O(n) |
| 18 | [Insert Interval](https://leetcode.com/problems/insert-interval) | Medium | O(n) | O(n) |
| 19 | [Unique Paths](https://leetcode.com/problems/unique-paths) | Medium | O(mĂn) | O(mĂn) |
| 20 | [Climbing Stairs](https://leetcode.com/problems/climbing-stairs) | Easy | O(n) | O(1) |
| 21 | [Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes) | Medium | O(mĂn) | O(1) |
| 22 | [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring) | Hard | O(n) | O(k) |
| 23 | [Word Search](https://leetcode.com/problems/word-search) | Medium | O(mĂnĂ4áľ) | O(k) |
| 24 | [Decode Ways](https://leetcode.com/problems/decode-ways) | Medium | O(n) | O(n) |
| 25 | [Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree) | Medium | O(n) | O(h) |
| 26 | [Same Tree](https://leetcode.com/problems/same-tree) | Easy | O(n) | O(h) |
| 27 | [Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal) | Medium | O(n) | O(n) |
| 28 | [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree) | Easy | O(n) | O(h) |
| 29 | [Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal) | Medium | O(n) | O(n) |
| 30 | [Best Time to Buy and Sell Stock](https://leetcode.com/problems/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](https://leetcode.com/problems/two-sum) | Easy | O(n) | O(n) |
| 2 | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers) | Medium | O(max(m,n)) | O(max(m,n)) |
| 3 | [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters) | Medium | O(n) | O(min(m,n)) |
| 4 | [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays) | Hard | O(log(min(m,n))) | O(1) |
| 5 | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring) | Medium | O(n²) | O(1) |
| 6 | [ZigZag Conversion](https://leetcode.com/problems/zigzag-conversion) | Medium | O(n) | O(n) |
| 7 | [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi) | Medium | O(n) | O(1) |
| 8 | [3Sum](https://leetcode.com/problems/3sum) | Medium | O(n²) | O(1) or O(n) |
| 9 | [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number) | Medium | O(4âż) | O(n) |
| 10 | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses) | Easy | O(n) | O(n) |## Microsoft
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity |
| --- | ------- | ---------- | --------------- | ---------------- |
| 1 | [Two Sum](https://leetcode.com/problems/two-sum) | Easy | O(n) | O(n) |
| 2 | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers) | Medium | O(max(m,n)) | O(max(m,n)) |
| 3 | [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays) | Hard | O(log(min(m,n))) | O(1) |
| 4 | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring) | Medium | O(n²) | O(1) |
| 5 | [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi) | Medium | O(n) | O(1) |
| 6 | [Roman to Integer](https://leetcode.com/problems/roman-to-integer) | Easy | O(n) | O(1) |
| 7 | [3Sum](https://leetcode.com/problems/3sum) | Medium | O(n²) | O(1) or O(n) |
| 8 | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses) | Easy | O(n) | O(n) |
| 9 | [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists) | Easy | O(n+m) | O(1) |
| 10 | [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists) | Hard | O(n log k) | O(1) |View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity |
| --- | ------- | ---------- | --------------- | ---------------- |
| 1 | [Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching) | Hard | O(mĂn) | O(mĂn) |
| 2 | [Roman to Integer](https://leetcode.com/problems/roman-to-integer) | Easy | O(n) | O(1) |
| 3 | [3Sum](https://leetcode.com/problems/3sum) | Medium | O(n²) | O(1) or O(n) |
| 4 | [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number) | Medium | O(4âż) | O(n) |
| 5 | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses) | Easy | O(n) | O(n) |
| 6 | [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists) | Hard | O(n log k) | O(1) |
| 7 | [Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group) | Hard | O(n) | O(1) |
| 8 | [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array) | Easy | O(n) | O(1) |
| 9 | [Implement strStr()](https://leetcode.com/problems/implement-strstr) | Easy | O(nĂm) | O(1) |
| 10 | [Search in Rotated Sorted Array](https://leetcode.com/problems/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](https://leetcode.com/problems/two-sum) | Easy | O(n) | O(n) |
| 2 | [Insert Interval](https://leetcode.com/problems/insert-interval) | Medium | O(n) | O(n) |
| 3 | [Text Justification](https://leetcode.com/problems/text-justification) | Hard | O(n) | O(n) |
| 4 | [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring) | Hard | O(n) | O(k) |
| 5 | [Maximal Rectangle](https://leetcode.com/problems/maximal-rectangle) | Hard | O(mĂn) | O(n) |
| 6 | [The Skyline Problem](https://leetcode.com/problems/the-skyline-problem) | Hard | O(n log n) | O(n) |
| 7 | [Maximal Square](https://leetcode.com/problems/maximal-square) | Medium | O(mĂn) | O(mĂn) |
| 8 | [Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream) | Hard | O(log n) insert, O(1) find | O(n) |
| 9 | [Bulls and Cows](https://leetcode.com/problems/bulls-and-cows) | Medium | O(n) | O(1) |
| 10 | [Count of Smaller Numbers After Self](https://leetcode.com/problems/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](https://leetcode.com/problems/two-sum) | Easy | O(n) | O(n) |
| 2 | [Insert Interval](https://leetcode.com/problems/insert-interval) | Medium | O(n) | O(n) |
| 3 | [Text Justification](https://leetcode.com/problems/text-justification) | Hard | O(n) | O(n) |
| 4 | [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring) | Hard | O(n) | O(k) |
| 5 | [Maximal Rectangle](https://leetcode.com/problems/maximal-rectangle) | Hard | O(mĂn) | O(n) |
| 6 | [The Skyline Problem](https://leetcode.com/problems/the-skyline-problem) | Hard | O(n log n) | O(n) |
| 7 | [Maximal Square](https://leetcode.com/problems/maximal-square) | Medium | O(mĂn) | O(mĂn) |
| 8 | [Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream) | Hard | O(log n) insert, O(1) find | O(n) |
| 9 | [Bulls and Cows](https://leetcode.com/problems/bulls-and-cows) | Medium | O(n) | O(1) |
| 10 | [Count of Smaller Numbers After Self](https://leetcode.com/problems/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](https://leetcode.com/problems/nested-list-weight-sum-ii) | Medium | O(n) | O(n) |
| 2 | [Shortest Word Distance II](https://leetcode.com/problems/shortest-word-distance-ii) | Medium | O(n) | O(n) |
| 3 | [Closest Binary Search Tree Value II](https://leetcode.com/problems/closest-binary-search-tree-value-ii) | Medium | O(n) | O(n) |
| 4 | [Two Sum III - Data structure design](https://leetcode.com/problems/two-sum-iii-data-structure-design) | Easy | O(n) | O(n) |
| 5 | [Nested List Weight Sum](https://leetcode.com/problems/nested-list-weight-sum) | Medium | O(n) | O(n) |
| 6 | [Max Stack](https://leetcode.com/problems/max-stack) | Medium | O(n) | O(n) |
| 7 | [Find Leaves of Binary Tree](https://leetcode.com/problems/find-leaves-of-binary-tree) | Medium | O(n) | O(n) |
| 8 | [All O'one Data Structure](https://leetcode.com/problems/all-oone-data-structure) | Hard | O(1) for each operation | O(n) |
| 9 | [Can Place Flowers](https://leetcode.com/problems/can-place-flowers) | Easy | O(n) | O(1) |
| 10 | [Factor Combinations](https://leetcode.com/problems/factor-combinations) | Medium | O(2âż) | O(n) |
| 11 | [Paint House](https://leetcode.com/problems/paint-house) | Medium | O(n) | O(1) |
| 12 | [Paint House II](https://leetcode.com/problems/paint-house-ii) | Hard | O(nĂk) | O(n) |
| 13 | [Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation) | Medium | O(n) | O(n) |
| 14 | [Shortest Word Distance](https://leetcode.com/problems/shortest-word-distance) | Easy | O(n) | O(1) |
| 15 | [Text Justification](https://leetcode.com/problems/text-justification) | Hard | O(n) | O(n) |
| 16 | [Count Different Palindromic Subsequences](https://leetcode.com/problems/count-different-palindromic-subsequences) | Hard | O(n²) | O(n²) |
| 17 | [Binary Tree Upside Down](https://leetcode.com/problems/binary-tree-upside-down) | Medium | O(n) | O(n) |
| 18 | [Max Points on a Line](https://leetcode.com/problems/max-points-on-a-line) | Hard | O(n²) | O(n) |
| 19 | [Partition to K Equal Sum Subsets](https://leetcode.com/problems/partition-to-k-equal-sum-subsets) | Hard | O(nĂ2^n) | O(n) |
| 20 | [Insert Delete GetRandom O(1)](https://leetcode.com/problems/insert-delete-getrandom-o1) | Medium | O(1) for each operation | O(n) |
| 21 | [Number of Islands](https://leetcode.com/problems/number-of-islands) | Medium | O(mĂn) | O(mĂn) |
| 22 | [Exclusive Time of Functions](https://leetcode.com/problems/exclusive-time-of-functions) | Medium | O(n) | O(n) |
| 23 | [Valid Triangle Number](https://leetcode.com/problems/valid-triangle-number) | Medium | O(n²) | O(1) |
| 24 | [Valid Number](https://leetcode.com/problems/valid-number) | Medium | O(n) | O(1) |
| 25 | [Repeated DNA Sequences](https://leetcode.com/problems/repeated-dna-sequences) | Medium | O(n) | O(n) |## Flipkart
View Problems
| No. | Problem | Difficulty | Time Complexity | Space Complexity |
| --- | ------- | ---------- | --------------- | ---------------- |
| 1 | [Add Two Numbers](https://leetcode.com/problems/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](https://leetcode.com/problems/lru-cache) | Medium | O(1) for each operation | O(n) |
| 2 | [Department Top Three Salaries](https://leetcode.com/problems/department-top-three-salaries) | Hard | O(n log k) | O(n) |---
## About
A curated list of coding questions asked in FAANG, OpenAI, Tesla, and other top tech company interviews. This repository aims to help you prepare effectively for technical interviews.
## System Design Interview Questions
Looking for system design interview questions? Check out our comprehensive guide:
[System Design Interview Guide](SYSTEM_DESIGN_INTERVIEW.md) - A curated list of the top 25 must-do system design problems for tech interviews with complexity ratings and company-specific information.
## 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:
- **GitHub**: [@ombharatiya](https://github.com/ombharatiya)
- **Twitter**: [@ombharatiya](https://twitter.com/ombharatiya)
- **LinkedIn**: [ombharatiya](https://linkedin.com/in/ombharatiya)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](LICENSE) file for details.