How to Pass Amazon Interview


Before you can sit for the onsite exam, you must pass the amazon coding interview. Please check this blog on how to pass the amazon coding test.

I was able to successfully pass the Amazon exam in my second attempt. It was a very challenging and refreshing experience. In this blog, I am sharing what I did to prepare for the exam.

Interview Structure

The on-site interview has four separate interview sessions, done by four individual interviewers. Each interview should take about 55 minutes.

Out of four interviews, three will be algorithmic questions. One will be a system design question.

Algorithemic Questions

For Algorithemic questions, you will have to write your code on a paper or on a whiteboard. You can use any programming language. You will have to provide the runtime and/or memory complexity of your program. You will have about 40 minutes to finish your question. If you complete it early, the interviewer may ask you a different question.

Design Question

Same goes for the design question. You have to draw the design diagram on the paper/whiteboard and explain your question to the interviewer. Similarly, you will have about 40 minutes to complete the question.

Leadership Questions

Amazon is very serious about its leadership principles. At the end of each interview, you will be asked some questions about Amazon Leadership Principles. This will take about 10 – 15mins.

Preparation – Algorithms

Basically, follow the same set of preparations that I described here for the coding exam.

Preparation – Design Question

Design question can be very challenging because of the ambiguous nature of it.

These questions can be of two flavors. Either it can be a very high-level question like “Design the Netflix”. Or it can be quite a low-level question like “Give me a class diagram for a Table”. So either you are designing a very complex system with high granular modules. Or you are designing a very simple system with very modules with low granularity.

To prepare for this exam again you have to practice a lot. Do sample amazon design questions available online. Try to glance through SOLID Design principles. Key to pass this interview is to be able to justify your design trade-offs to the interviewer. You don’t have to present your solution with AWS, or any cloud solutions for that matter. Use whatever technologies you are familiar with should do.

Preparation – Leadership Principles

You can read about the leadership principles here. Read each one of them and try to absorb the essence of every principle. Then try to think about your past experiences where you had to apply these principles. I recommend you to prepare two examples for each of the leadership principles from past experiences.

During the Interview – Think Out Loud

Always maintain good communication with the interviewer. Ask questions regularly. Also, try to think out loud. Explain your thought process to the interviewer. For a particular question if you can think of two or three solutions, explain all the solutions to the interviewer. And tell him what you think the best solution and why.

Make Assumptions

If the questions are ambiguous, clarify all the ambiguity with the interviewer. You may be able to make some assumptions to simplify the problem. If you are going to make any assumptions, tell it to him.

Use Language Provided APIs

You can use any language-provided library for the algorithmic questions. This is highly encouraging because it saves your valuable time. But if you are going to use any API / Data structure, you should be able to explain the interworking of them to the interviewer probably with the complexity.

Leadership Questions

For leadership questions, you will be asked about one of your past experience. And you will be asked lots of questions from different angles of the situation. It will be very hard to maintain a lie; so be honest and truthful.

One Screwup Doesn’t Matter Much

Also, all interviewers have a vote on you. So if you screwup one interview, don’t give up. Give your best shot to remaining interviews.

Other Recommended Readings


How to Pass Amazon Online Coding Test


If you are sitting for the onsite interview,  please check this blog on how to pass amazon onsite interview.

A few years ago, I managed to successfully pass the Amazon online coding test. It was extremely challenging. In this blog, I am explaining how I prepared my self for it.

Purpose of the Coding Test

The purpose of the online coding test is to identify candidates who may do well on the onsite interview. It basically measures how good of a problem solver, and a coder you are. There are some questions to judge whether you are the correct cultural fit for the company.

Exam / Test

Amazon uses an online coding tool for the test. Your recruiter will send you a link to the exam. You can always follow the link and look around to get familiar with the tool. You should be even able to do some practice tests. You can take an exam in most of the popular programming languages (like Java, C++, Python, Ruby…).

The test has two coding questions.  You will have 90 mins to complete both questions. After 90 minutes tool will auto submit your code and close the window. The tool should provide few tests, which you can use to validate you code. You can always add extra tests to improve the accuracy of your algorithm.

Cultural question is given after the coding exam. These questions are MCQs and not timed.


Brush up your algorithm knowledge before the test. I would recommend Sorting, Searching, Hashing, Tree Traversal, Graph Traversal, and Dynamic Programming algorithms. Get familiar with data structures like Linked Lists, HashMaps, Trees. Do not waste your time looking at too complex data structures/algorithms like the red-black trees.

Language – Choose Wisely

If you are familiar with several languages use the one with most API support. For example, if it’s C vs Java, choose Java. This will help you to save time.

Be ready to take the full advantage of language-provided data structures and algorithms. For example, if you are planning to code with Java, get familiar with the Java Collections framework. Get familiar with data structures like Maps, Lists, LinkedHashMap, Priority Queues, TreeSets, and TreeMaps; and the methods available in the API classes.  Also, check utility methods available in the Collections and Array classes; also Comparators.

Learn to Calculate Time / Memory Complexity

You are usually asked to provide the time/memory complexity of your code. So another area of study if you don’t remember how it is calculated.

Practice Practice Practice

The practice is the key. Do as much as practice questions you can. There are several online web sites which provide practice algorithmic questions. Make the best use of them.

Start your preparations as soon as you got the message from the recruiter. Generally, the link to the coding test expires within 1 – 2 weeks.

During the Exam

You can access the internet during the exam. You are allowed to use your own IDE. This useful because it compiles a bit faster and provides auto suggestions. But the risk is if you couldn’t submit your code on time, you don’t have anything to show.

Time is Precious

50% of the exam is about time management. Problems you get are complex enough to make it difficult to finish both within 90 minutes. If the first question is an easy one, don’t spend too much time on it. Finishing both questions is far more important than brushing up the code of the first problem.

If you are running out of time, prioritize the important bits of the algorithm. For example, if you are going to implement a sort, you should prioritize the Comparator since it’s going to be to the core logic of the program.

Write Good Code

This is the first time Amazon is going to see your code. So try to give the best first impression. Follow basics; use meaningful variable/method names, move the redundant code to functions. Try to create classes instead of using complex collections. Write comments where needed. Try to output the best program you can.

Do not Brute Force

You may be tempted to solve some problems by brute force. But try to provide an optimal solution as possible. Brute force solutions will not raise any eyebrows. So only be used as a last resort.

Cultural Questions

After coding questions, you will have to answer a questionnaire which evaluates whether you are a good cultural fit for Amazon. Don’t worry this questionnaire is not timed. Try to be your self and answer honestly. If you and company are not going to be a good match, it’s going to be a bad move for both the parties.

Also, don’t trust the tool too much save your work continuously as you progress.


Personally, I took about 3 weeks to prepare my self for the coding test. So start early and give your best shot at it.