Amazon | SDE1 | Hyderabad | Oct 2021 [Offer]
Summary
I applied for the SDE1 role at Amazon in Hyderabad and received an offer after completing 5 rounds of interviews over 2.5 months. It was a comprehensive process covering data structures, algorithms, and leadership principles.
Full Experience
I applied for the SDE1 role through the Amazon jobs portal, which led to a series of 5 interview rounds spread over 2.5 months. Here's a detailed breakdown of my experience:
Round 1 – Online Assessment (First week of Aug, 2021)
This round consisted of two coding problems, for which I successfully passed all test cases.
- Q1: Prime Orders: I had to sort a list of orders, each with an ID and metadata. Prime orders (non-numeric metadata) come before non-prime orders (only-numeric metadata). Prime orders are sorted lexicographically by metadata, then by ID in case of a tie. The relative order of non-prime orders must remain the same.
- Q2: Demolition Robot: Given a matrix with 0s (trenches), 1s (flat), and a 9 (obstacle), I needed to find the minimum distance from the top-left corner (always flat) to reach the 9. Movement was restricted to up, down, right, left, avoiding 0s and staying within the matrix. If impossible, -1 should be returned.
Round 2 – 1st Technical Round (First week of Oct, 2021)
This round started with my introduction, followed by:
- A hard-level problem: Find the LCA of the deepest nodes of a graph.
- An easy-level problem: Determine the minimum number of flips required to make a binary string alternate.
- A Leadership Principle (LP) question: Tell me about a time I faced an obstacle and how I overcame it.
Round 3 – 2nd Technical Round (First week of Oct, 2021)
Similar to the previous round, it began with an introduction.
- A medium-level problem: Find the missing number in a sorted array. I was asked to first solve it with a brute force approach and then optimize it using binary search.
- A medium-level problem: Check if two n-ary trees are mirrors of each other.
- A Leadership Principle (LP) question: Tell me about a time when you innovated and exceeded expectations.
Round 4 – Hiring Manager Round (Second week of Oct, 2021)
After my introduction, this round included:
- A medium-level problem: Given two sorted arrays with common elements, find the maximum sum path to reach from the beginning of any array to the end of any of the two arrays. Switching between arrays is allowed only at common elements. For example, for
ar1[] = {2, 3, 7, 10, 12}andar2[] = {1, 5, 7, 8}, the output is 35. - Several Leadership Principle (LP) questions, including discussions about one of my projects and related technical questions, a time I learned new technologies, and a time I had conflicting ideas with teammates and how I resolved them.
Round 5 – Bar Raiser Round (Second week of Oct, 2021)
This final round focused heavily on Leadership Principles and my projects:
- Questions about a project I'm proud of.
- A scenario where I faced a setback initially but still achieved the goal.
- A time when I thought of an unpopular idea.
- A situation where I went above and beyond my job responsibilities.
- In-depth questions related to Machine Learning aspects of my projects.
- Deep dive questions on a project I was currently working on.
The overall verdict was that I was selected, and I received an offer for the SDE1 role.
Interview Questions (19)
Given a list of orders, where each order is a string. For example: [aax 12 23] [ff kindle ebook] are two orders. Each order has an ID, which is the first part of the order (ID of order 1 = aax, ID2 = ff). The remaining part of the order is referred to as MetaData. There are two types of orders: Prime orders (which contain non-numeric MetaData) and Non-Prime Orders (which contain only-numeric MetaData). Sort the list of orders as given below:
a. Prime Orders before NonPrime Orders.
b. Prime Order with lexicographically smaller MetaData comes first.
c. In case of tie in (b), the one with lexicographically smaller ID comes first.
d. The relative order of NonPrime Orders remains the same.
Given a matrix with values 0 (trenches), 1 (flat), and 9 (obstacle), find the minimum distance to reach 9 (obstacle). If not possible then return -1.
The demolition robot must start at the top left corner of the matrix, which is always flat, and can move one block up, down, right, left.
The demolition robot cannot enter 0 trenches and cannot leave the matrix.
Sample Input:[[1, 0, 0],
[1, 0, 0],
[1, 9, 1]]
Sample Output:3
Find the Lowest Common Ancestor (LCA) of the deepest nodes of a given graph.
Find the minimum number of flips required to make a binary string alternate (e.g., '01010' or '10101').
Tell me about a time you faced an obstacle and how you overcame it.
Find the missing number in a sorted array. First, solve with a brute force approach. Then, optimize it with Binary Search.
Check if two n-ary trees are the mirror of each other or not.
Tell me about a time when you innovated and exceeded expectations.
Given two sorted arrays, such that they have some common elements. Find the maximum sum path to reach from the beginning of any array to the end of any of the two arrays. We can switch from one array to another array only at common elements.
Input: ar1[] = {2, 3, 7, 10, 12}, ar2[] = {1, 5, 7, 8}
Output: 35
Tell me about one of your projects.
Some technical questions related to one of your projects.
Tell me about a time when you learned new technologies.
Tell me about a time when you had conflicting ideas with your teammates and how did you resolve them?
Tell me about a project you're proud of.
Tell me about a time when you faced a setback initially but still achieved the goal.
Tell me about a time when you thought of an unpopular idea.
Tell me about a time when you went above and beyond your job responsibilities.
Questions on Machine Learning, specifically related to my projects.
In-depth questions on a project I am currently working on.