Showing posts with label placements. Show all posts
Showing posts with label placements. Show all posts

Sunday, 29 July 2012

The Amazon Interview Process



This is the crude stuff about how my interview at Amazon went, I did not want to bore my dear friends with it, but then I thought may be someone would find it useful. So this will be one among that few that's just there in my blog but not for my readers to read. This is for that tech crazy job aspiring people who would really find this useful as I found many such blogs useful for my preparations.



Amazon’s interview process is sure one of the toughest to crack, especially since they come with a very specific list of skills. Amazon’s interview process is intended to analyse one on the basis of a set of data points and the cumulative of all data points are taken to find the final result. It must also be noted that if one candidate fails to satisfy the company’s requirement even on one data point he or she will be eliminated instantly.

An Overview of Amazon's Interview process


Amazon looks for the following in any candidate

  • Programming skills
  • Problem solving skills
  • Knowledge of Data Structures and Algorithms
  • Problem identification skills


Amazon’s recruitment/placement process is divided mainly into two parts

  • The preliminary test
  • The technical interviews ( 3 – 4  interviews in the span of a day)

The preliminary test contains both technical and aptitude based questions and it also includes two programming questions that have to be coded in an environment provided by amazon. The primary aim of the programing questions are not to test your ability to produce outputs but the focus is on finding the better answer or the faster easier logic.

The interviews purely focuses on ones ability to solve problems and the depth of ones knowledge in the field of data structures and algorithms. The more important thing is that one should be able to code on paper as they will ask for complete working programs and they wont provide you a compiler to test it on. Further care should be taken when coding for the edge cases as all edge cases will be explicitly tested on your code by them.

The Aptitude / Technical Test

If ones dream of getting into Amazon must come true then it is mandatory that this round be cleared and clearing this is not very easy.

They ask around 20 wildly assorted questions spanning everything in computer science fundamentals and a few from aptitude section as well. One could always expect a few output questions from c and cpp. The only trick is to be through with the fundamentals. The list of questions and their topics I remember will be listed at the end.

Programming Questions

The more crucial part of the preliminary test is the coding section where you will be asked to code  two rather simple programs ( simple in reference to other programs that usually appear for coding contests or online coding tests) within a time span of 45 mins. Though Amazon as such does not explicitly specifies any restrictions with respect to the time and memory conception of the code, they do evaluate by hand the optimality and efficiency of the code to decide whom they should let in to the interviews.

Getting an output is not the primary criteria for getting a safe passage into the interviews. Do take extra care to make sure that a better solution is provided for each problem being asked. One more thing that should be kept in mind is that though the environment accepts your program if it provides the correct output for the provided test case it may not get you to the next round. Make it a point to construct your own test cases and test your code on that too. These should guarantee you a safe passage to the next round.

Again the question that I was asked and I remember will be provided at the end of the so called long prose.
PS: By the way don’t think about copying, they do use dif on  the codes.

The Interviews

I did have to go through a sum total of about 6 hours of interview process before I was selected and it was divided into 3 sessions. First a 45 minutes interview that tested me on problem solving, next was an another 1 and a half hour interview on Data structures and lastly a 3 hour 15 min interview on more advanced and tricky use of data structures, algorithms and problem solving.

The first interview included a warm welcome and two very straight forward questions, It only included a basic understanding of data structures and some very crucial logic to get past this one

The second one was a HR interview and a technical interview rolled into one. The HR questions asked were pretty basic and included questions like, what is your achievements and why amazon so on and so forth. The one thing to be sure about is that you should know your resume back and forth. They have asked me everything that was there on that piece of paper. Again all questions I remember will be appended to the document.

The third interview was the toughest one of all, it was a gruelling three hour process and some tough questions. There were two programming questions again one was really tough and the next was relatively easier which was then followed by lots of direct questions on data structures, more like rapid fire back to back questions round.

Every time they do ask if we have questions and its appreciated that one asks them questions and they do like being asked questions about the company and how work happens in Amazon.

Tips and Tricks

·      Learn to be able to deduce logic for solving a problem and then convert the logic into code. Do follow the distinction between the two. This helps achieve a generic approach to solving adhoc problems. I suggest using of flowcharts to deduce this logic as it helps convert complex logic to code very easily.( It aided me in coming out of the final interview in flying colours).

·       Try programming puzzles in sites like codechef and do participate in coding contests. This helps in developing an appetite  and aptitude for solving programing puzzles.

·         Do study data structures and algorithms very well, they are absolutely necessary for Amazon and do practise such that you be able to identify immediately what databases serves best when used to solve a particular problem.

The Questions

Preliminary

MCQ:

  1. Given a rectangle of given size what is the minimum no of squares needed to exactly cover the rectangle.
  2.  Identify a given algorithm.
  3. Given several pipelines their time costs and the delay in starting each pipeline what is the time taken to execute a certain no of instructions that are depended on each other.
  4. What is the maximum number of processors that can run using 11 resources such that deadlock will not occur.
  5. Which of the following happens ( deadlock and starvation), deduce for the given code.
  6. Several output questions.
  7. One question to identify the suitable characteristics of a network to be used under specified circumstances.
  8. A question for speed distance and time.

Sorry that’s all I can recall.

The two programming questions are

  1. Given that amazon wants to recruit only one from a group of n equally qualified candidates, they have decided to make them all stand in a row and them ask the ones standing at odd places to go home, repeatedly till one exists. Given n by standing at what position shall ensure a sure recruitment by Amazon.
  2. Given a linked list containing a sequence of characters, reorganise the string such that all the vowels appear first and the consonants next and they be sorted in the order they appeared.

Interview Round 1

  1. Given that amazon wants to recruit only one from a group of n equally qualified candidates, they have decided to make them all stand in a row and them ask the ones standing at odd places to go home, repeatedly till one exists. Given n by standing at what position shall ensure a sure recruitment by Amazon. Assume that the list given is  a linked list and all that you will have is the pointer to the start of the linked list.
  2. Print the elements in a n x m matrix diagonally and from bottom to top

Egs   for  a simple 3x3 matrix filled with number 1 - 9 print  7 , 4 8, 1 5 9, 2 6, 3                                                                                         

Interview Round 2

  1. Given a stack add the following feature without changing any of the characteristics of the stack. getminelement() with unit complexity, O(1).
  2. Everything in the resume round.
  3. What are my best achievements and why I consider it my best achievement?
  4. What are my weaknesses and when and how has it affected my productivity?
  5. What are my projects and explain in detail what I did?
  6. Explain how I managed my team and concentrated my teams effort to achieve our aim.

Interview Round 3

  1. Given that the input is a binary tree connect all the elements in the same level or depth using links.
  2. Given the stack what additional modification can you bring to the stack such that you are able to check the presence of an element in the stack.
  3.  Direct questions on Hashing( predominantly )and other data structures.

Additional Questions


  1. To swap adjacent elements of a linked list by modifying only the pointers. 1->2->3->4 becomes 2->1->4->3 and 1->2->3->4->5 becomes 2->1->4->3->5
  2. To sort the elements of a vector. Stable sort. The elements are sorted based on element%7. {1,2,3,4,5,6,7,14} becomes {7,14,1,2,3,4,5,6}
  3. To find number of sequences of the form 1...N such that each element differs from the previous by +1 or +2. N is the input. Bonus: Generate all possible sequences for given N.
  4. An array is given. Each element differs from the previous by +1 or -1. Best way to find the first occurrence of given number.
  5. Given an array of extremely huge size, find the sum of elements from ith index to jth index. There will be lots of queries even for a single array. So some sort of pre calculation is expected.