Interview Date: August, 2020
First session 55 mins
2 LP Questions
Coding Question:
Assume we have a dictionary of the user and a list of his friends. There is another dictionary present which has a mapping of a user and a list of movies he has watched sorted by timestamp with the most recent on the top of the list.
Given a user, make a recommendation of top K movies based on a list of movies his friends have watched or friend of a friend has watched. Assume the data needs to be collected only for up to the Nth degree of a friend.
Example:
Given user_follows = {'A': ['B', Z'], 'B': ['C'], 'C': ['D']},
movies = {'B': [mvi1, mvi2], 'C': [mvi3, mvi1, mvi2], 'D': ['mvi3']},
If k =2 and N=2, then the k recommended movies to user A are result = ['mvi1', 'mvi2']. Explanation: N =2 implies that the result is only interested in getting recommendations based on immediate friends and immediate friends of the user's immediate friends.I was able to solve it and give optimized solution. Interviewer was convinced and said this is exactly what he was looking for.
Second session 55 mins
Started with background and current projects discussion.
Why Amazon.
2 LP questions
Coding Question:
Assumre you have a Telivision screen. This screen is grid of cells. There are few objects on the screen. When you click on the obejct, change the color of onyl that object. If user clicks outside the object, then only color outside should change keeping color inside all objects boundaries unchanged. Requirements and question were not clear. So I asked a plenty of clarification question. There were a list of objects on screen. So when a user clicks on the screen, need to make sure you change the color only of that object.
Something similar: Flood Fill question. Something similar to: https://leetcode.com/problems/flood-fill/
I was able to solve this question too.
Third session 55 mins
2 LP Questions
System design Question -
Design Music streaming system.
Interviewer was asking too many questions on every word I say. We spent almost 35 min on LP. He started giving me some suggestions on one the AWS services. And rest of the time on system design question.
I felt like I messed up this round. In last two minutes I gave a High level diagram though. Fouth session 55 minutes
Lot of LP Questions.
Coding Question:
Implement Package Installer.Question had only three words. I started asking examples and Interviewer insisted on coming up with classes and interfaces. I was like I need clarity on what exactly you are looking for.
Another bad experience here. I felt like Interviewer was looking for something very specific.
Reject:
Didn't hear fromt he recruiter for 2 days. I dropped an email later and just got an email that I was rejected. I was expecting recruiter to call at least.
Overall - I know I did mess up some parts of the interview. However, I was not very happy with recruiter or my interviewer either.