Amazon Interview Experience | Pre Placement Offer

Arthak
Coding Blocks
Published in
3 min readJul 31, 2020

Internship

So I received an Internship opportunity from Amazon through an on-campus opportunity in August 2019 and joined Amazon as an SDE Intern in May 2020. I wrote about the Interview process of the Summer Intern earlier here.

Week 1: We had the Day 1 Onboarding, and the Students Team helped us to understand and get familiar with how things work at Amazon. Later we were provided the contact details of our Manager and was told to get in touch with him.

Week 2: I was introduced with my Mentor, and later in the week, I was assigned the project along with the resources necessary to learn the prerequisites.

Week 3–7: I worked on my project that was based around changing DNS Entries in Route53. I had a lot of support from the Mentor and the team to tackle problems whenever I got stuck anywhere. Also, the internal tools and support system inside Amazon was very overwhelming as well.

Week 7–8: I had to write a Document describing the details of my project and my experience here. Also, I had both of my Interview Rounds during this time as well.

It is crucial to write clean code, getting your code reviewed, and complete your project on time.

Interview Round 1

This round consisted of 2 Problems and 1 hour time period. I was able to complete both of the problems in 40 minutes.

In the beginning, I introduced myself and told him about the experience that I had during the internship and the status of my project.

The first problem was that I was given the following code with a complexity of O(N³), and I had to optimize it, so I was able to come with an O(N) solution using priority_queues.

Given 2 arrays X and Y of size N
output = 0;
for(i=1->N) {
for(j=1->N) {
for(k=1->N) {
if(X[i] = X[j] or X[j]=X[k] or X[k] = X[i])
continue;
else
output = max(output, Y[i]+Y[j]+Y[k]);
}
}
}
return output;

The solution that I wrote is listed here.

The second problem was to find out the diameter( the longest path between any two nodes) of a binary tree, and I was able to come up with a single DFS O(N) solution to this problem. The solution that I came up with is linked here. Also, there is an article on GFG for the same question (link).

Interview Round 2

Due to some delay and technical issues, I had around 35 minutes to solve two problems in this round. I was able to get both of the problems correct within the specified time.

Problem 1: Given a binary tree, print the level order traversal in a zigzag order.

For the given tree,
2
/ \
3 4
/ \ / \
5 6 8 7
/ \
10 9
Order: 2 4 3 5 6 8 7 9 10

Unfortunately, I don’t have the solution that I wrote for this round, but the same problem is available on GFG (link). My answer was using Deques and BFS and had an O(n) time and space complexity.

Problem 2: Given the starting and ending times of a lot of meetings, figure out the minimum number of rooms required to conduct all these meetings.

I came up with an O(n log n) solution with O(n) extra space by firstly sorting the meetings by their start time and keeping track of their end times using a priority queue.

Overall, both of my interviews went well, and I received my Pre Placement Offer on Jul 23, 2 weeks after my debrief.

In total, seven students out of 13 received PPOs, and results for two students are still pending.

--

--