5年经验,在 Sunnyvale 面的

I was reached out to by a recruiter from Amazon regarding an oppurtunity in Sunnyvale. She asked if I would be interested and would be ok to take an online assessment(OA), after which she sent me a link for the same.

Online Assessment:
It consisted of 3 parts:

  • Two Algorithm questions. Both were easy to implement a brute force solution but an optimal way will take a few minutes of thinking. The questions were long and requires lot of patience to read (like realllllly long!) but essentially it boiled down to following types:
    1. Find two numbers in an array whose sum is equal to a given number. We had to return the indices of the numbers, in an another array which form the final pair. If there are multiple pairs, then return the indices of the pair which contained the largest number.
      Eg: arr = [100,100,20,120,180] and sum=200 -> Possible answers are [0,1] or [2,4] we should return [2,4] since arr[4] = 180 is the largest.
    2. Given two unsorted lists of integers find a pair of numbers closest to a given number. Return all the possible pairs which are closest to the number.
      Eg: list1 = [20,10,30,20] & list2 = [20,30,40], target = 70 Ans: [20,40],[30,30],[20,40]. Note each number in the pair must be from each list
  • Explaining your answer for the first section and give complexity analysis. I implemented both solutions using brute force but I included what is the faster approach compared to the brute force in this section.
  • Behavioral questions in a survey format with multiple choices.

Within a day of finishing the OA I got a mail from the recruiter congratulating me on completing the OA successfully and asked me to give dates to travel for onsite in Seattle. I got confused as I thought it was for a position in Sunnyvale. I asked the same, she mentioned that position was filled and they have one open in Seattle but I let her know that I was not willing to relocate and expressed that I would be happy to interview for positions anywhere within the Bay Area. After a few days she reached out and connected me to another recruiter for a different team in Sunnyvale who immediately scheduled an onsite since they thought my previous experience was what they were looking for and I had already completed the OA.

Onsite (6 轮):

  • 第一轮 (15 Mins): This was the HR. She asked me a few questions about my immigration status and prep-ed me for what to expect throughout the day. HR was very nice and made me feel comfortable.
  • 第二轮 (1 Hour): This was a senior manager. He came 15 minutes late as he had mistaken that the interview was for a different day so he apologized and said he will skip the coding part. He asked me to explain my previous experience. And asked me lots of LP questions. I had never attended amazon interview before so he was giving me pointers on what I should emphaize for the next rounds when LP questions were asked. Basically the recruitment was a confidential new project, so I had no idea what they were looking for in my past experience so I started explaining everything. As I was explaining my experience, he wanted me to elaborate more on something they found relavant to their project and suggested I should emphasize on these experiences for the future rounds. I overall felt it went pretty good. I found difficult to talk slowly, as generally I am a fast speaker so I had to slow down to give them enough time to complete their notes and at the same time maintain my train of thoughts.
  • 第三轮 (1 hour): This person was from the team I was being recruited for. She asked me LP questions in the beginning for 30 minutes and next 30 minutes was coding. Question was - a modified maze problem which I solved using backtracking . She seemed novice to interviewing, as she was not really giving much inputs when I was coding. She was typing down what I was writing on the white board in her computer. But I was comfortable with back tracking and had previously solved similar questions so I didn’t find it very difficult. Ofcourse writing the code on the board took me long time and we barely had time to do basic testing of the code I wrote. So no idea whatever I wrote was even working. She asked me what was the runtime and space complexity for the same.

Lunch with a possible team mate. I was told I was not being interviewed during lunch so I could relax and we just talked casually and had a great conversion.

  • 第四轮 (1 hour): This was with the hiring manager. Again lots of LP questions and explaining previous experience. He asked one system design question - to design the DVR (settop box) feature to record a show . Felt good about this round as well.
  • 第五轮 (1 hour): By now fatigue was starting to set in and my mind was being restless from all the talking. Again lots of LP questions. I had not prepared for LP as extensively as I should have which I think is the reason why I didn’t get an offer. Basically he asked me what was a ‘mistake’ I had done. In my mind, I thought ‘mistake’ meant something major so I told I haven’t done any so far in my career, which he didn’t seem to like and kept pushing me think. I told honestly I have nothing in mind. I should have asked him to explain ‘mistake’ more. Maybe he felt I was not being honest. After this he asked me a couple of more LP questions and I feel like he was not happy with my answers for them either. I was kinda thrown off by this and when we got to the coding part I completely bombed even though the question was so easy! The question was - given an input array return an ouput array where the value at an index i is multiplication of all the elements other than the element at index i. I implemented the optimal solution. Idea was to traverse the array and multiply all elements(total) then traverse the array again and put value at index i in output as out[i] = total/input[i] (See: https://leetcode.com/problems/product-of-array-except-self/). I mentioned that we can’t do this if have zero, so if there is zero present I will stop and return a array of zeros. For this he asked me ‘Am I sure?’ and asked me to write it down manually. And when I did I realized what I had done Eg: [1,2,0] then output is [0,0,2] not [0,0,0]!!!. I completely panicked after this and corrected my implementation then he asked what would happen if there were more than 1 zero! And I panicked some more :)… Basically in the end after covering all the scenarios he was happy with the code and then I had to tell ( facepalm moment ) now I have to handle negative numbers!!! (like a damn fool!!). He asked me ‘Am I sure?’ then I realized what I had just said and just stopped talking and said ‘sorry I panicked!’. He gave me a few minutes to recollect myself and asked if I had anything to ask him. I just asked something and didn’t even bother to listen cause I knew I had bombed it :slight_smile:
  • 第六轮 (1 hour): After the last round I should taken a break and completely relaxed but nope I had to jump right in like a fool and mess this one as well. This interviewer started from the coding part. He asked me - given a linked list with a random pointer how would I make a deep copy of it in-place (See: https://leetcode.com/problems/copy-list-with-random-pointer/). Immediately my approach was to have mapping, instead of making just one map (Oldpointer->Newpointer), I made another one (Newpointer -> Oldpointer), which was dumb on my part looking back it now but I was just thinking out loud and he stopped me and asked if I needed the mapping. Which confused me and I started to think of different approach, so after 5 mins of me blabbering something he told go back to my old approach and then asked if you need the second mapping!. Then the solution hit me. Traverse the linked list and create new linked list without the random pointer and maintain only one mapping (Oldpointer->Newpointer) then traverse the old linked list and connect the random pointers in the new linked list by accessing the mapping I just created. I could see that he was expecting me to get it in the first try with no help and no matter what I told for the LPs questions which came next would make no difference :). But i kept my chin up and tried my best to answer them as enthusiastically possible.

Result: I got a mail from the HR within 3 days of the onsite conveying that I was not selected.

Learnings: I felt I needed to prepare for the LP questions more. Make atleast 2 stories for each LP values. Try and use the exact word without sounding too reheased. And don’t panic if you get something wrong. It happens and there is always a way to get back from that. Speak slow but fast enough to not sound boring. Don’t think everything out loud as soon as they give you the question, let your train of thoughts take shape in your mind before you speak out of what you are thinking. And do more mock interviews!! This was my 4th interview from the past 2 years which is not enough to get you ready for a stressful situation. You maybe be able to code flawless by yourself but you need to do mock interviews to help you communicate more effectively in an interview.

Overall it was a postive experience. The questions were not very difficult to solve but needed a few minutes of calm thinking. I felt all the people I interacted with during this process was courteous and professional. If I had not panicked in the last two rounds and taken a break when I noticed I was slipping I would have hit it out of the ball park. Next time I will be ready :slight_smile:

1 Like