With its mission of being “Earth’s most customer-centric company,” Amazon is one of the top places to work for in 2020. So before we get into the interview questions, let’s first understand the company culture and the Interview Process.
They say it is always Day 1 at Amazon, and the focus is on hiring employees that make fast decisions, stay smart, innovate for customers, and remain nimble. To understand the kind of company Amazon is, you need to look at some highlights from annual letters that Bezos writes to the shareholders.
- “Our success will be largely affected by our ability to attract and retain a motivated employee base, each of whom must think like, and therefore must actually be, an owner.”
- “We want to be a large company that’s also an invention-machine. We want to combine the extraordinary customer-serving capabilities that are enabled by size with the mentality normally associated with entrepreneurial start-ups.”
- “We don’t do PowerPoint presentations. Instead, we write narratively structured memos and silently read one at the beginning of each meeting in a kind of “study hall.” These papers generally range from one to six pages and articulate the project goal(s), approach to addressing it, outcome, and next steps.”
- “We believe in building a culture of high standards.”
To maintain this culture of customer obsession and ownership, Amazon employs an extensive interview process with multiple rounds that test your aptitude, coding ability, and technical prowess. These rounds are then followed by interviews with the hiring manager as well as the HR team. This all boils down to Jeff Bezos’ ideology of
“I’d rather interview 50 people and not hire anyone than hire the wrong person.”
But well, preparation is the key to success. Let’s go over everything one step at a time and create a checklist that you can be prepared to conquer the mountain that is the Amazon Interview.
Here's what this article will cover:
- Amazon Interview Questions - Key Technical Areas
- Interview Questions - Data Structures
- Amazon’s Leadership Principles
- Behavioral Interview Questions
- Questions based on Leadership Principles
Amazon Interview Questions - Key Technical Areas
Before we get into the actual questions, let’s look at the major topics that candidates are generally tested on during Amazon interviews.
Most of Amazon’s work involves storing data and providing access to it in the most efficient ways. Thus, it is an essential requirement that you be well-versed with how data structures work and are able to compare them based on their usage applications.
As you will be working with a lot of data at Amazon, you need to fetch it from the store and push data in there for future use. You need to be comfortable with basic Database concepts and their applications in various scenarios.
Having a thorough understanding of commonly used algorithms is essential to be a great software engineer, and that’s what Amazon looks for. We will go over the specific algorithms later. Still, you need to know the runtimes, limitations, and implementation strategies for each algorithm before you head into the interview.
Object-oriented programming is one of the best system design practices to create bug-free code that can be extended when needed － making it a highly efficient system. You must have a working knowledge of writing code in an object-oriented manner and some common design patterns.
Being an e-commerce company, Amazon needs software engineers that have a sound understanding of how the world wide web works. Being familiar with the fundamentals of browser functions, DNS, and TCP/IP is yet another essential skill to have.
Machine Learning & Artificial Intelligence
Amazon is one of the front-runners in the technology space, and being familiar with basic concepts and algorithms can provide the extra edge that sets you apart. Understand how train/test protocols work in data-driven modeling and have an idea of how you can provide an exhaustive plan on dealing with any machine learning problem given to you.
Now that we’ve understood the key areas that Amazon tests candidates on, let’s go over some specific topic-wise questions.
Interview Questions - Data Structures
- An unsorted array of non-negative integers is provided, and you need to find a continuous sub-array, the numbers of which add up to a given value.
- An unsorted array is provided, and you need to count the total number of triplets that are formed in such a way that the sum of the first two values adds up to the third number.
- Kadane’s Algorithm: An array is provided, and you need to find the continuous subarray with the maximum sum.
- An unsorted array and a list of values (that are supposed to be in the array) are provided. You need to find the number missing in the array.
- You are given two arrays, and you need to merge the two arrays to output one sorted array.
- A sorted array is provided, and you need to arrange the values in a way that the maximum and the minimum values appear in an alternate fashion.
- Given two arrays A & B, you need to find the number of pairs where ab>ba, where a & b are elements from A & B, respectively.
- You are provided an unsorted array, and you need to determine its inversion count － an indication of how far the array is from being sorted.
- You are given an array of 0s, 1s, and 2s. You need to arrange it in an ascending or descending order.
- An array is provided, and you need to find the equilibrium point － the point where the sum of the elements before it equals the sum of elements after it.
- In the given array, you are required to find the leader—the value which is greater than all the values that come after it.
- You are provided with the arrival and departure times of trains and are required to find the minimum number of platforms needed such that no train waits.
- A sorted array is provided, and you need to reverse every sub-array of a fixed number of elements.
- You are provided an array and a number ‘X’ that is smaller than the size of the array. Your task is to find the Xth smallest number in the array.
- Rain Water Trap: You are provided an array of non-negative integers where each element represents the height of the blocks at that point, while the width of each of these blocks is 1 unit. With water being trapped in each of the empty areas, find the total amount of water that can be trapped after raining.
- Pythagorean Triplet: An array of integers is provided, and you need to write a program that returns ‘True’ if there is a sub-array of values such that a2 + b2 = c2.
- Chocolate Distribution: Provided an array of positive integers where each value represents the number of chocolates in a packet, your task is to distribute these packets to a given number of people in a way that: a) Each person gets a single packet. b)The difference between the number of chocolates in the largest packet received and the number of chocolates in the smallest packet received is the minimum.Input an array from the user that has the cost of a single stock on each day and then find the days on which the stock needs to be bought and then sold such that the profit is maximum.
- You are provided an unsorted array, and you need to find the first element which has all smaller elements to its left and larger elements to its right
- An unsorted array is provided, and you need to arrange all the elements in a zig-zag fashion such that a<b>c<d>e</d></b>
- An array is provided that has only 0s & 1s. You need to find the position of the last 1 that occurs in the array.
- Provided an array of any given size, you need to traverse and print the array in a spiral form.
- Given a set of numbers, you need to place them next to each other and create the largest number possible. Print the number out as a string.
- You are provided a sentence, and you need to reverse the sentence without reversing any word.
- Print out all the possible permutations of a string provided.
- Find the longest palindrome that is a subset of a given string.
- Remove all adjacent duplicates from an input string.
- Input two strings and check if one string can be obtained by reversing the other
- Input a Roman number as a string and convert it to an integer value.
- Input two strings and check if the strings are anagrams of each other.
- Remove all duplicates from an input string.
- Input a string and find the least number of characters needed to make it a palindrome.
- Input a string and then identify the length of the largest substring that has all distinct values.
- Input a string and then convert it to an integer value.
- Input two strings and then locate the occurrence of one string in the other.
- Input an array of string and then find the largest prefix common to all strings.
- In an array with multiple words, you need to find the word that gets repeated the most.
- You are provided with two strings. You need to remove all the common elements and concatenate them both.
- Find the height of a given binary tree.
- Convert a given binary tree to its mirror.
- Print the in-order traversal of a given binary tree.
- Print the pre-order traversal of a given binary tree.
- Remove all the half-nodes from a given binary tree.
- Convert a given binary tree to a Circular Doubly Linked List in-place. Use the left and the right pointers in nodes as previous and next pointers, respectively.
- Clone a given binary tree that has random pointers.
- Two arrays are provided to you － one that has the pre-order traversal and another that indicates whether each node is a leaf node or not. Using these arrays, create a binary tree.
- You are provided with a binary tree that consists of arithmetic operators and integers. You are supposed to evaluate and print the tree’s final output as an integer.
- Given a number ‘X’ and a binary tree, you are supposed to print all the elements that appear at the Xth position from the root.
- Print out the sum of all nodes at each level in a binary tree
- Print out the difference between the sum of all nodes at even levels and the sum of all nodes at odd levels.
- Provided a binary tree, input a target node, and an integer ‘X’ to then print all the nodes that are at X distance from the target node
- Input two nodes and a binary tree. Your task is to find the distance between the two nodes － the number of turns needed to go from one point to the other.
- Input two linked lists and a number ‘X’. Find the total number of pairs that have a total sum of ‘X.’
- Input a reference point and the order of arrangement. Then sort the list in the specified order using MergeSort.
- Input a singly linked list and then print it out after deleting the middle value.
- Input two linked lists and then print their union after removing all duplicates.
- You are provided a linked list, and your task is to group odd and even elements in separate groups and place the group of odd elements before the group of even elements.
- Given a singly linked list, input order and rearrange the list in the specified order.
- Given a linked list, input a reference point index and delete the value at that point.
- Input two polynomials in the form of linked lists and then add the respective coefficients to obtain the sum of two polynomials. Print the final polynomial.
- Provided a singly linked list, input a number ‘X’ and then swap the Xth node from each end of the linked list.
- From a given linked list, extract and reverse the alternate nodes. Append this new list to the original list and print the final list as output.
- A player in a game can score either 3, 5, or 10 in each move. Provided a score, print out all the combinations that would reach it.
- Input a number ‘x’ and then find the total number of strings that can be made with ‘a’,’b’, and ‘c’ where ‘b’ can be used at most once, while ‘c’ can be used at most twice.
- Input a string and then convert it to a palindrome by removing the least number of characters.
- You are provided an array of integers. Input a number ‘X’ and find all the subarrays that add up to ‘X.’
- Input a number ‘X’ and then find the total number of structurally unique binary search trees that can be formed with the numbers from 1 to X.
- Given a dictionary of words, input a string and identify if the string can be separated and explained by the dictionary. Print the string out in a way that is explained by the words in the dictionary
- Input an array and divide it into two sub-arrays such that the absolute difference of the subs of these sub-arrays is minimized.
- You are provided with a binary matrix, and you need to find the largest square sub-matrix that has only 1s.
- Input an array and an integer ‘X’ and then check if the array can be divided into X subsets. Print all the subsets.
- Illustrate the differences between primary keys and unique constraints.
- Explain database normalization.
- What is the Amazon Relational Database? Explain some of its features
- Explain the key-value store.
- Explain DynamoDB. What are some of its features & benefits?
- Illustrate, with an example, how DynamoDB Mapper Class works.
- What is auto-scaling in DynamoDB?
Redshift is Amazon’s data warehouse product that is a part of AWS. It is a cloud-based data storage that can be used to store and analyze a massive amount of data while also allowing large-scale database migrations. By employing MPP (Massively Parallel Processing) Architecture, users can load data at breakneck speeds and run complex queries in much lesser time.
- What is a data warehouse, and why is it important?
- What is Amazon’s Redshift? What makes it popular?
- What is the role of Redshift in data storage?
- Throw some light on the difference between Redshift and Redshift Spectrum.
- What is the difference between a Compute node and a Leader node?
Relational Database Service (RDS) & ElastiCache
A relational database management service from Amazon, RDS makes setting up, operating, and scaling relational databases in the cloud much easier. It provides a cost-efficient resizable capacity while automating admin tasks such as setup, patching, and backups.
- What is Amazon’s RDS, and what are its main features?
- Which RDS supports database engines?
- What is the primary purpose of launching a standby RDS instance?
- Is it possible for a user to upgrade or downgrade according to their needs?
- What are the uses and benefits of ElastiCache?
- Explain the ElastiCache cluster and the different types of engines it employs
Amazon’s Leadership Principles
To understand Amazon’s company culture, a candidate must understand the 14 leadership principles that form the company’s core. Let’s dive right into these.
- Customer Obsession
Leaders must earn and keep customer trust by starting with them and then working backward. Do pay attention to competitors, but obsess over customers.
Leaders must think long-term and not sacrifice long-term value for results in the short-term. They must act beyond their teams and never say, “That’s not my job.” They must be owners and act on behalf of the entire company.
- Invent & Simplify
Leaders must always expect innovation from their team and find ways to simplify tasks and processes. They must be externally aware and look for new ideas everywhere. They should accept that as they do new things, they will be misunderstood for a long time, but should never be limited to “not invented here.”
- Are Right, A Lot
Leaders are generally right due to their strong judgment and good instincts. They always seek different perspectives and work to have their beliefs disconfirmed.
- Learn and Be Curious
Leaders must always seek to improve themselves and must never stop learning. They should always be curious about exploring new possibilities.
- Hire & Develop the Best
Leaders must recognize exceptional talent and must raise the bar with every hire and promotion. They should willingly move new talent throughout the organization to coach them and develop new leaders.
- Insist on the Highest Standards
Leaders must have exceptionally high standards. Some people might even think they are unreasonably high, but leaders should continue to raise the bar and drive teams to deliver excellent quality products and services through efficient processes. They must ensure that defects do not get passed down the line, and a fixed issue stays fixed.
- Think Big
Thinking small is a self-fulfilling prophecy, and hence leaders must create and communicate a bold direction that inspires results. They must always think differently and look around corners for ways to serve customers.
- Bias for Action
As speed is of great importance in businesses, leaders must take calculated risks to prioritize decisions and actions as some are reversible and do not require extensive study.
Leaders must be frugal and must accomplish more with less. They must understand that constraints breed resourcefulness, self-sufficiency, and invention, and hence there are no extra points for growing headcount, budget size, or fixed expense.
- Earn Trust
Leaders must listen attentively, speak candidly, and treat others respectfully. Even if it is awkward or embarrassing, they must always be vocally self-critical. They should never believe their team’s body odor smells of perfume and must continually benchmark their performance against the best.
- Dive Deep
Leaders must operate at all levels, and there must be no task that is beneath them. They must frequently audit to always be connected to the details and be skeptical when metrics and anecdotes differ.
- Have a backbone; Disagree & Commit
When in disagreement, leaders must respectfully challenge decisions even when it is uncomfortable or exhausting. They must have convictions and must be tenacious. They must never compromise for the sake of social cohesion, and when a decision is determined, they should commit wholly to it.
- Deliver Results
Leaders must focus on the key inputs for their business and deliver those with great quality and at the right time. Even with setbacks, they must always rise to the occasion and never settle.
As Amazon puts a significant emphasis on the kind of people they hire, behavioral tests form an integral part of their interview process. Amazon not only tests if the candidates are a good fit in the company culture but also assesses them on their work style through what they call － Work Style Assessments and the Work Sample Simulation. Let’s understand these in a bit more detail.
Work Style Assessment
Approximately 10-20 minutes long, these are centered around Amazon’s culture and Leadership Principles. Here, the company wants to understand your work style, and you help them do that by selecting statements that best represent your choices and interests and your approach to everyday tasks.
Work Sample Simulation
These simulations can take anywhere between 20 minutes to an hour to complete and require you to demonstrate your problem-solving, prioritization, and interpersonal skills. Depending on the role that you’ve applied for, the tasks might involve interpreting data from charts, answering customer questions, resolving issues, finding the right information from multiple sources, or even multitasking.
Behavioral Interview Questions
Here are some popular behavioral questions that have been asked in some Amazon Interviews.
- Tell me about an instance when the path forward was not clear cut. What decisions did you take to move ahead?
- Tell me about a time that you tried to accomplish something but failed. What were your learnings from the entire situation?
- What were some occasions when you showed initiative?
- Tell me about a time that you motivated others—either your team or your colleagues/peers.
- Give me some details about a time when you had to delegate projects effectively. What were the strategies used, and how did you manage conflicts?
- Have their been instances when you coached someone?
- Tell me of a time when you adopted fact-finding and research skills to solve a problem.
- What excites you about Amazon, and why do you want to work here?
- What do you expect to learn by working at Amazon?
Questions based on Leadership Principles
- Which Leadership Principle do you resonate most with?
- If you were to add another principle in Amazon’s culture, what would you propose?
- Tell me of an occasion when you displayed customer obsession and went above and beyond what was expected.
- Tell me about a time when you worked to solve the problems for a customer who was very difficult to deal with.
- What does the principle “Are Right, A Lot” mean to you?
One of the top companies to work at, Amazon, has a dynamic work culture where hierarchies tend to fade, and each employee is a business owner. Some cultural practices at Amazon seem particularly peculiar, such as the culture of writing—they don’t do PowerPoint presentations. Instead, they write large memos that contain the project goals, approaches to address it, expected outcome, and the next steps. So being able to articulate your thoughts, structure them, and present them on paper is a skill that’s essential to be able to work at Amazon.