Amazon Online Assessment (OA) questions

We have explained the process and skills tested in Amazon Online Assessment (OA) and listed the most commonly asked questions (with answers) in Amazon Online Assessment (OA) so that you can practice well.

Note: Amazon and the Amazon logo are trademarks of, Inc. or its affiliates.

Table of contents:

  1. Basics of Amazon Online Assessment OA
    1.1. Amazon OA1
    1.2. Amazon OA2
    1.3. Amazon OA3
    1.4. How is your test results judged?
  2. Questions asked in Amazon OA

Let us get started with Amazon Online Assessment (OA).

Basics of Amazon Online Assessment OA

Amazon Online Assessment (OA) is the first online test / assessment conducted on online coding platforms like HackerRank or Codility that an applicant to Amazon needs to take to get into Software Developer Engineer (SDE) role at Amazon. The result in Amazon OA determines if the candidate will move forward to phone or on-site Interviews where you interact with an Amazon Engineer.

Amazon OA is divided into 3 parts:

  • Part 1 OA1 : covers debugging questions
  • Part 2 OA2: Algorithmic Questions where you need to code solutions
  • Part 3 OA3: Work Style assessment (does not involve coding)

One not need to pass all tests. For a SDE Intern or New Graduate position, you need to attempt only OA1 and OA2.

Amazon OA1

In OA1, the focus is to test debugging and logical reasoning.

You will be given a short code (upto 50 lines) with a small error. Your task is to fix the error. Common errors that are presented in Amazon OA are:

  • Off by one errors
  • Overflow issues
  • Memory access issues
  • Error in coding equation
  • Wrong Loop control conditions

There are up to 5 debugging questions.

This section will also include a few simple logic and reasoning based questions. A sample question like:

Consider the sequence 2, 4, 8, 16, 32. What is the next number?
The next number will be 64 as the sequence is of powers of 2.

Amazon OA2

In the 2nd part Amazon OA2, you need to design and implement solutions to a standard Algorithmic Problem. You will be needed to solve 2 problems within 1.5 hours.

Solving both problems correctly is important and only if you have solved both questions, you are moved to the next set of Interviews. We have presented the most common questions asked in this section later in this article.

Amazon OA3

In this last part Amazon OA3, you will be given up to 10 questions that will test your work culture and thinking process. The questions will describe a situation in office or work and you will need to explain what path will you take.

There is no right or wrong answer in this section but your answers must be reasonable and your reasoning for your action should be strong enough to back it up.

An example will be that if there is a disagreement between your team for which solution to take for a given problem, what will you do to resolve the tensed situation?

How is your test results judged?

You need NOT to score 100% in all three parts to move forward to the next set of Interviews. Your goal should be to do the bare minimum (at least) to clear this round. The following rounds will be much easily as you will get to interact with an Amazon Engineer.

The main points to pass the Amazon Online Assessment (OA) are:

  • Solve the 2 Algorithmic problems in OA2 with all test cases passed. This is important and if you have not been able to solve both problems completely, your chances are slim sadly. Good news is the problems asked are common and we have listed the problem set later in this article which you can practice and solve both problems easily.
  • In OA1 and OA3, you need not to solve all questions correctly. Answering 50% of the questions and matching with the expected Amazon answers is good enough.
  • Your test results are not assigned any cut off score but your results are judged based on the results of other candidates who appeared for the test for a same profile. Top 25% of the participants are moved forward. This is easier than it make look.

Practice the problems and questions listed in the next section to ace your upcoming Amazon Online Assessment (OA) easily.

Questions asked in Amazon OA

In this section, we present some of the most common questions asked in Amazon Online Assessment (OA). You must practice all these questions so that you are fully prepared your test.

Questions for OA1

In this part, you will be given 2 programs and you need to find the bug:

For example, Find the bug in following C++ code snippet:

float average(int a, int b) {
    return (a + b) / 2.0f;


  • Return type should be integer
  • Overflow
  • Does not handle negative integers
  • Does not handle the case when a = 0 or b = 0

To understand the complexities of finding the average of two numbers, go through this article explaining logic of midpoint.

Commonly asked logical reasoning questions in Amazon Online Assessment (OA) Part 1:

  1. If one code can solve a problem of size N in X steps. How many steps are needed if we run Y codes for the problem size 2N?
  2. In a secret language, QUEEN is written as OVCFL, then how is "KING" written?
  3. If door = 25, lower = 37, tower = 18, then what number is "over" equal to?
  4. In the expression 6 : 49 :: 7 : X, what is the value of X?

Questions for OA2

The most commonly asked Algorithmic Problems in Amazon Online Assessment (OA) Part 2 are:

  1. Number of palindromic substrings in a string: We need to find the Number of palindromic substrings in a string using Dynamic Programming.
  2. 3 Sum Problem: Given a set of numbers, find three numbers whose sum is equal to a given target.
  3. 3 Sum Closest Problem: Given a set of numbers, find three numbers whose sum is closest to a given target.
  4. 4 Sum Problem: Given a set of numbers, find four numbers whose sum is equal to a given target.
  5. Move negative elements to front of array: Given a list of integers (positive and negative), you need to move all negative numbers to the front without sorting.
  6. Implement two stacks in one array (Important): In this, we need to implement 2 Stacks in one array.
  7. Implement K stacks in one array: In this, we need to implement K stacks in one array so that maximum space is utilized.
  8. Equilibrium Index: Find index such that sum of left sub-array = right sub-array
  9. Longest Decreasing Subsequence: Given a sequence of numbers, we need to find the Longest Decreasing Subsequence.
  10. Longest Common Decreasing Subsequence: This problem is frequently given as a second part of the previous problem and you need to find the Longest Common Decreasing Subsequence.
  11. Number of substrings divisible by 8 but not 3: Many may attempt this as a string Problem but it requires Dynamic Programming. This is very important as many applicants have failed in this problem.
  12. Calculating Permutation Coefficient: This is a simple problem involving Dynamic Programming which is often given as the first problem.
  13. Tile Stacking Problem: This is challenging problem and is given as the second problem. Do practice this and many struggle to solve this during the assessment.
  14. Finding Diameter of Tree using Height of each Node: This is a Graph based Problem which is frequently asked in Amazon Online Assessment (OA).
  15. Topological Sort using Breadth First Search (BFS): Many questions are solved using Topological Sort. Read the question and think if Topological Sort can be applied.
  16. Shortest Path with k edges: This is a tough Graph Algorithm that is asked frequently. This involves Mathematical ideas as well to implement it efficiently.
  17. Largest Palindromic Number by Rearranging Digits: In this problem, we need to rearrange digits in a number so that it becomes the largest Palindrome possible.
  18. Activity Selection Problem: Activity Selection is the favorite problem of Amazon. Do practice this multiple times before appearing for the online assessment.

Practice implementing the solutions in your Programming Language. There is no limitation on which Programming Language you can use. The common Programming Languages used are C++, Java and Python.

If you practice the above questions we have listed, you will be well prepared for Amazon Online Assessment (OA). All Algorithmic questions will be asked from this short list so you need not worry.

Questions for OA3

This section is the easiest as you need to answer the questions based on your imagination. The questions may have multiple choice answers or you may need to give a short explanation.

The most commonly asked questions in Amazon Online Assessment (OA) Part 3 are:

  1. If 2 different teams in Amazon are doing the same work and you as a team leader come to know about this, what actions will you take?

Possible answer: Conduct a knowledge sharing session. Try to resolve conflicts and increase collaboration within the two teams.

  1. If two teams members complain about each other, what actions will you take as a team leader?

  2. If an new Intern is not able to do any productive work, what actions will you take as an SDE at Amazon and mentor of the Intern?

  3. If you as a SDE at Amazon, are unable to fix a bug in your code, what next step will you take?

  4. If you, as a SDE at Amazon, do not agree with the vision of a project assigned to you by your Manager, what actions will you take?

This article at OpenGenus wraps up the most common questions asked in Amazon Online Assessment (OA). If you practice the problems and questions we have listed, you will be well prepared for your first Interview at Amazon. Best of Luck. We, at OpenGenus, hope that you will get the job.