Amazon | SDE2 | UK | Aug 2020 [Reject]
Anonymous User
959

Status: New grad, MS CS
Exp: 6 yrs of frontend experience before MS
Location: EU
Date: Aug, 2020

I cannot share the exact questions due to NDA.

The Onsite Interview(5 rounds):

Round 1:

  • 30 Mins of LP questions.
  • Implement a data structure(a really famous one) with its standard methods(such as push, pop) and a reverse method.
    Since it was an easy question, i think the major emphasis was on OOD implementation and exception handling. I was able to design the DS with all methods, and struggled a bit with decisions such as "should i raise an exception or just log it and return None"

Round 2:

  • 30 Mins of LP questions.
  • DS Question related to find the shortest path between a source and a target node in a graph. Only pseudo code was required and time and space complexity was discussed.
    I suggested to use BFS or bidirectional BFS. Upon agreement with interviewer, i proceeded with BFS. My space complexity was O(N^2) since i was storing all the expanded paths until a target was found. I was asked to optimize the space complexity from O(N^2) to O(N) which i was able to achieve after a hint.

Round 3:

  • 30 mins of LP
  • A pretty famous amazon OOD question related to applying different filtering criteria to a set of objects and the focus was on inheritence and clean code.
    I think, i did well on the OOD part and i was able to make correct use of making abstract classes and implementing the filtering criteria.

--Lunch Break--

Round 4:

  • 50 mins of LP. A lot of LP questions and i feel this was the bar-raiser round.
    Not sure how i did, i already exhaused my most relevant stories by then, so i had to repeat the stories.

Round 5(System Design):

  • 25 mins of LP
  • HLD of a management system(i saw this question on various other posts but only for LLD not HLD). Similar of parking management but not exactly, consider you have different parkings at different locations and user can select which location he wants a parking in. Then allocate a parking space to him in that area based on its space requirements.
  • No diagram was required, only verbal explaination was asked. The interviewer asked me to start small and i suggested to use hashmap such as <location_ID, Size>: freeParkings[] to keep a stack of all available spaces for that location and of the size. Whenever a request will come for the location, i can pop from the relevant stack and allocate that parking space to the user.
  • How do you to handle concurrency and multiple request for the same location and same size. I was not sure about the solution here and after some hints of using a DB and acqiuring a lock on row, i was able to suggest something like "All users will read from the stack and try to acquire a lock in the relational DB for that parking space but only one of them will get the lock and others will try to read again from the hashmap(which is in redis). Also, we will replicate our service and each service will keep its own hashmap(a subset of the free spaces) so that multiple requests for the same key will go to different instances and there will be less chances of conflict. A LB will balance the requests going to different services in a round robin fashion". I felt that the interviewer was not satisfied and suggested to move on to other things.
  • A question of operations and business considerations you would keep in mind while designing this system. Basically for operational considerations, i briefed him about using a zookeeper with heartbeats to moniter different services and manage the resources if any of the node is down.
    For business, i suggested to store the orderID and userID in the datawarehouse to do some analytics later on like which users use the service the most, for what kind of orders they use this service etc for further expansion of the business. No followup questions on this.

Result:
After 5 days, the recuriter called me and told me that it's a no this time. No feedback was shared.

Thoughts:
I think, i did well on OOD and DS questions. Last round caused me the rejection. I feel the system design round was unstructured and i was not able to understood the requirements properly initially. After the interview, when i though about it, it was no different that a distributed parking lot. Other thing was, the interviewer asked for the verbal discussion and no drawing, probably it made it worse. It would have helped me better if i drew the rough system and explain the areas where i am struggling to scale(but thats my personal opinion towards the interviewer, i was definitely not prepared well for system design).

Can't say much about my performance on LPs but i think, my performance was satisfactory on LPs. I had stories to tell for all the questions(although i repeated the stories myself at times).

Anyways, it's just the beginning, i am not disheartened by the rejection. I see the interview as a good opportunity that allowed me to sharpen my DS as well as design skills(i was almost unfamaliar with all the system design terms that i learnt in the last 2 months) and definitely 300+ LC questions helped me to become better with DS and algos. I would keep on working on brushing my design skills better and hope to land someday at FAANG or similar companies where i can work on large scale systems.

Comments (1)