Amazon Interview Experience for SDE-1 | Off-Campus ( Exp<1year)

Position: SDE1 at Amazon
Location: Bangalore/Hyderabad
Date: 7 March, 2020

Online Assessment
There were two coding questions:
1. One based on standard BFS in a matrix
2. Based on priority queue something similar to k Order statistics

Virtual Onsite Interviews:
Round 1: 

1.There are two types of chocolates Milk chocolate and Dark chocolate and N rows of such chocolates. You are given some number X(milk chocolate) and Y(dark chocolate) that is the number of chocolates you have to complete . You have to find what is the maximum number of rows you can cover? (Sorry, if the description is not clear but in the interview I was given this description only, I’ll try to clear it with help of some examples).
Note: Order of chocolates is not important.

Example 1: M M D D
D D
D M M
X=3 Y=4
Output: 2
As we can cover either row 1 and row 2 or row 2 and row 3 but not all the rows.



Example 2: D D
M
D M M
X=1 Y=1
Output: 1
As we can cover only row 2.

Example 3: M M D D
D D
D M M
X=5 Y=7
Output: 3
As we can cover all the rows.

2. https://www.geeksforgeeks.org/count-subarrays-equal-number-1s-0s/

Round 2:
1. https://www.geeksforgeeks.org/sliding-window-maximum-maximum-of-all-subarrays-of-size-k/
2. You are given a linked list and a number k. You have to sort the linked list in groups of size k by the sum value of each individual chunk in decreasing order. The elements within a chunk will not change.
Example:
Linked List: 1->3->0->5->1->7->0->2->4->3
k=2

Output: 1->7->4->3->0->5->1->3->0->2
Explanation:
1->3=4
0->5=5
1->7=8
0->2=2
4->3=7
So, the chunk 1->7 has sum 8 which is the highest so it will be placed first. Then chunk 4->3 with sum 7 after it and so on.

Round 3: With Senior Technical Program Manager
Behavioural LP
Role in current company sort of questions.
Little discussion about projects.
What is caching?
OOPS questions like inheritance, problems faced in inheritance, diamond problem and virtual keyword.
Design LRU cache ( only approach was discussed, no need to code).
Coding question: careercup.com/question?id=5717962873896960

Round 4: Senior Manager
Detailed discussion about projects and current role. Lots of behavioural questions based on LP.
What is caching? Types of caching algorithm.
Design LRU cache. Extended it a little bit how you will handle if more than one thread try to insert value in cache at the same time. Also, should know whatever STL containers you are using how they are implemented. I was asked how is list implemented in C++ (doubly linked list or singly linked list not too much depth).
More LP.

 

After a week around I got the call that I am selected :). Thanks GeeksForGeeks!

Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.