Wanted to share my thoughts and experience with a recent interview for SDE with Amazon.
The whole thing started a few weeks ago when I was contacted by a recruiter if I was interested in interviewing for a Software Development Engineer position with Amazon in Seattle. As everyone know Amazon is a pretty interesting place to work and a the interview process in one of the really tough ones in the industry, I was up for a challenge and said we should go ahead.
The recruiter was very responsive and quick in setting up interviews:
1st round, telephone interview:
The interviewer was a nice guy ad after chit chatting for about 5 minutes about what he does at Amazon started asking questions:
1) You have an array of integers, such that each integer is present an odd number of time, except 3 of them. Find the three numbers.
2) Given a singly linked list, find out if it is a palindrome, also asked to write code for this and then read out the code.
3) Design an object oriented design for a parking lot software such that you can find details about available parking spaces available on each floor of the parking lot.
After this we chit chatted for some time and then the interview was over.
The next day I got a call from the recruiter saying that the interview went well and Amazon wanted to schedule another round of phone interview. Again they were really quick in setting up a phone interview with another software engineer at Amazon.
Again the guy called right on time we chit chatted for some more time and then the technical interview started:
1) You have two binary trees, find if they are structurally identical. Write code for this and read it out.
2) Design an object oriented design system for an server that keeps track of shares and clients can ask the server to get the most up to date information about value of the shares.
Again the person on the phone was very nice and was guiding me if I was getting stuck somewhere
A few days later I again got a call from the recruiter asking me about my availability for an onsite interview in their downtown office. I chose a friday as that was easiest for me being local.
This was pretty interesting, I was supposed to have 5 back to back interviews:
I was greeted by the recruiter at the front desk and she walked me to a conference room where I was supposed to be for the rest of the day talking to various people.
Round One: A dev engineer came in and introduced herself, and went straight at it:
1) You are given a long list of integers, so long that you can not fit the entire list into memory, implement an algorithm to get the max 100 elements in the list. I tried to explain her the k-way merge approach by splitting the list into k small list, individually sorting them and then merging them one by one using a max heap. She did not look happy with my solution and asked me to write some cases for it. Then asked me to write code for it. We did not even realize but we ran out of time and the next guy was waiting outside.
Round two: An engineering manager who had been with Amazon for quite some time, real nice guy.
1) Given a linked list, find if it had a loop in it. Write code and test cases.
2) How would you implement a utility to generate anagrams of a given word from a given dictionary.
3) You have an app server and suddenly one day you see that your app server is taking unexpectedly long time to respond to requests. How would you debug it.
Round three: Taken out to lunch by another engineering manager.
Usual chit chat about what I do and some new technologies that Amazon was into, not really an interview, just chatting and asked if I had any questions. I asked about Amazon fresh.
Round four: Straight to questions
1) You are given an array of integers, sorted, but rotated. Find an better than O(n) algorithm to find an element in an array. Write code for this.
2) You are given a function substring that returns true if a string is a substring of another string and you are given two string. Find is one string is formed by rotating the other one.
Round 4: An SDE
1) Given a binary tree, find it it contains a path that is equal to a given sum. Path mean start from root and end at a leaf node. Write code for this and then find the complexity.
2) Given a single linked list such that with a pointer to next node, it also has a pointer to something else in the list. Write a function to create an exact external copy of the list.
3) Design an object oriented design for a zoo management software system,