Top 25 Amazon + FAANG Interview Questions for Software Engineers?

Preparing for Amazon SDE interviews? Here are few questions you can’t miss

Top 20 Amazon + FAANG Interview Questions for Software Engineers?

Hello guys, In my last article I shared the top 10 Google Interview Questions and in this article I am going to sharing some frequently asked programming job interviews from technical giants and startups.

If you are going for a programming job interview with Microsoft, Google, or Amazon, you better be prepared for all kinds of questions.

These companies are known to ask tough questions, tricky puzzles, and lots of data structure and algorithm questions.

Since it’s hard to prepare all these in a short time, it makes sense to at least have a good idea of frequently asked programming questions in Microsoft, Google, or Amazon.

There are a lot of questions spread across the internet and if you are good at googling (not to mention, an important surviving skill in programming job), you can get tons of questions asked in these companies on LeetCode etc but nowadays I suggest you to checkout sites like AlgoMonster, ByteByteGo or Exponent which provides massive collection of company wide questions for preparation.

And, if you like to read you can also read Cracking the coding interview book, which contains 180+ programming questions and their solutions.

Cracking the Coding Interview: 189 Programming Questions and Solutions (Cracking the Interview & Career)

This list of programming questions is a mix of difficult, tricky, and easy questions, mostly collected from previous interviews on Google, Microsoft, and Amazon.

I have not included answers to these questions, as you should try them first by yourself if you are not able to solve them, then just Google it, you will see a lot of answers, approaches, and hints for these interview questions.

If you are still unable to find answers then post as a comment and I will help you to find answers to these programming interview questions.

Also, basic knowledge of essential data structure and algorithms is also very important and that’s why I suggest all Java programmers join the Data Structures and Algorithms: Deep Dive Using Java course or Data Structures for Coding Interviews in Java course on Educative to improve their knowledge and algorithms skills.

Data Structures for Coding Interviews in Java – AI-Powered Course

25+ Frequently asked Google and Amazon Interview Questions for Software Developers

Here is my list of 20 common programming questions from Google, Amazon, Flipkart, and other technology startups interviews. You might have seen them already but here they are again.

If you don’t know the answers to all the questions then it’s worth spending some time revising these vital questions.

1) Write code to reverse a linked list, if you are able to do it using loops, try to solve with recursion. (solution)

Hint: Use three pointers (prev, curr, next) for the iterative approach. For recursion, reverse the rest of the list and fix the next pointer on the way back.

How to reverse a linked list in Java using Recursion and Iteration (Loop) – Example

2) How to rotate an array by K? (solution)

Hint: Use the reversal algorithm — reverse the whole array, then reverse the first k and the remaining n-k elements.

3) Given an array that contains N-2 numbers in unsorted order, find two missing numbers? (solution)

Hint: Use the sum and sum-of-squares formula to compute the two missing numbers in O(n) time.

4) Given an array that has a number in the majority (a number appears more than 50% in the array), find that number? (solution)

Hint: Use Moore’s Voting Algorithm to find a candidate, then verify its frequency.

5) How to detect a loop in a singly linked list? If you are able to detect a loop then find the size of the linked list? (solution)

Hint: Use Floyd’s Cycle Detection (Tortoise & Hare). After detection, move one pointer to head and another from meeting point to find loop length.

How to find If Linked List Contains Loop or Cycle in Java? Example Solution

6) Given N steps to climb to reach a floor, a person can take 1 or 2 steps at a time to climb. Find the number of ways to reach the nth step? (discussion)

Hint: Classic DP/Fibonacci problem. Ways to reach n = ways to reach n-1 + n-2.

7) Design a Snake and Ladder Game by using Object Oriented analysis and design technique. Explain the reasoning behind interface and class structure?

Hint: Identify key entities: Board, Snake, Ladder, Player, Dice. Use classes for each and design game flow with turn-based logic.

8) How to merge two sorted linked lists, write a program in your favorite programming language e.g. Java, C++, or Python.

Hint: Use two pointers to traverse both lists and build a new list by comparing node values.

9) Write a Program that checks if two Strings are Anagram or not? (solution)

Hint: Count characters with a hash map or sort both strings and compare.

10) How to print all permutations of a given string using recursion? (solution)

Hint: Use recursion with swapping or backtracking to explore all character arrangements.

11) How to check if a binary tree is balanced or not? (solution)

Hint: Use DFS to compute heights and check if left/right subtree heights differ by no more than 1.

12) How to swap two numbers without using a temp variable, write code that is free from Integer overflow? (solution)

Hint: Use XOR (a = a ^ b; b = a ^ b; a = a ^ b) to avoid integer overflow.

13) How to find all pairs of elements in an integer array, whose sum is equal to a given number? (solution)

Hint: Use a hash set to check if target – num exists while iterating.

14) Write a program to check if a binary tree is BST or not? (solution)

Hint: Use in-order traversal and verify the result is strictly increasing.

15) Write a function to print the nth number in the Fibonacci series? (answer)

Hint: Use iterative DP or matrix exponentiation for O(log n).

16) Write a function to count a total number of set bits in a 32 bit Integer? (solution)

Hint: Use n = n & (n – 1) to remove the lowest set bit in each iteration.

17) Write code to implement an LRU cache? (solution)

Hint: Combine a HashMap for O(1) lookups and a Doubly Linked List for eviction ordering. In Java, you can also use LinkedHashMap and override its method to use it as an LRU cache.

18) Write a function to remove duplicate characters from String? (solution)

Hint: Track seen characters with a boolean array or hash set.

19) How to find the 3rd element from the end, in a singly linked, in a single pass? (solution)

Hint: Use two pointers with a gap of 3 nodes between them.

20) Design a Distributed Cache (like Memcached/Redis)
Hint: Cover consistent hashing for scalability, replication for reliability, and TTL-based eviction policies.

21) Design a Rate Limiter (System Design)(Solution)
Hint: Discuss token bucket or leaky bucket algorithms. Store request counts in Redis with timestamps for distributed environments.

Rate Limiter System Design Interview Question (Solved)

22) Design a Parking Lot (solution)
Hint: Identify entities like ParkingSpot, Vehicle, Ticket, and Payment. Consider constraints like different vehicle types (bike, car, truck).

23) Design a URL Shortener (like bit.ly)(solution)
Hint: Use a hash function or base-62 encoding for unique short URLs.
Discuss database design (e.g., key-value store) and strategies for avoiding collisions. You can also see following article for full solution.

How to Design a URL Shortener Service (System Design Interview Guide)

24) Design WhatsApp (Messaging System)(Solution)
Hint: Break into services — messaging (store-and-forward), user presence, media storage, notifications. Discuss message queues (Kafka), database choices (Cassandra, DynamoDB), and delivery guarantees.

System Design Interview Problem: Design WhatsApp

25) Design a News Feed System (like Facebook/Twitter)(solution)
Hint: Explain fan-out on write vs. fan-out on read. Use caching (Redis), pub/sub messaging, and ranking algorithms.

Design Twitter (X) – System Design Interview Question [Solved]

How to Use These Hints for Interview Prep?

  • Start small: Begin with coding questions to strengthen your problem-solving and DSA fundamentals.
  • Level up: Move to low-level design (OOP problems like Snake & Ladder, Parking Lot).
  • Go big: End with high-level system design (WhatsApp, Rate Limiter) to prepare for FAANG-scale interviews.

That’s all guys, These are some of the most frequently asked programming questions in technology companies like Microsoft, Google, and Amazon, but it’s not limited to them, many of them also appear in programming job interviews with other companies like Cognizant, Directi, Nomura or CTS.

It’s best to know and prepare these questions well in advance, with alternative solutions and Big O notation analysis. These are also good questions to sharpen your programming skills.

If you want to prepare an interview topic wise like array, string, data structure, design patterns, I also recommend to checkout out resources like ByteByteGo, AlgoMonster and Codemia.io to prepare better for coding and system design interviews

And lastly one question for you? Which one is your dream company to work as a Software Engineer? Amazon, NetFlix, Google, Microsoft, Meta, Apple or do you prefer to work with big investment banks like UBS, Citibank, Standard Chartered Bank, Goldman Sachs or JP Morgan etc?

Other System Design and Coding Interview and Resources you may like

All the best for your Amazon and FAANG job hunt journey, if you have any doubts or questions, feel free to ask in the comments.

P. S. — If you just want to do one thing at this moment, join ByteByteGo and start learning software architecture fundamentals and you will thank me later. It’s one of the most comprehensive resource for coding interview now.

System Design · Coding · Behavioral · Machine Learning Interviews


Top 25 Amazon + FAANG Interview Questions for Software Engineers? was originally published in Javarevisited on Medium, where people are continuing the conversation by highlighting and responding to this story.

This post first appeared on Read More