:: Share Your Experience And Make People Share Like You ::

Wednesday 25 March 2015

Amazon Interview Experience

Written Test:

  1. 20 Technical Question Similar to GATE only. Preparation from GEEKSFORGEEKS will be helpful.
  2. Two Coding problem. You have to write 2 programs. Language can be c/c++/java. Programming structure will be available in the editor. Need not to take input or print the output. Everything is already written in the editor. You have just write the logic in the //write your code segment.

Total duration of written exam is 90min.
Interview Questions:
There were two rounds of interview. Both are technical only.
Round 1:
Questions asked mainly from Data Structure and Algorithms. Few questions from os. For all question you have to write the code. It was must for both the interview.

  1. Write a code to inverse a link list in a block. Ex: input:1->2->3->4->5->6->7->8->9->N Output:3->2->1->6->5->4->9->8->7->N(for block size 3).
  2. Write a code to build a binary tree from a given tree binary were in each level you have to swap the left child and right child.(It is not a problem to form the mirror of a tree.)
  3. Write a code to find loop in a link list. If loop is there remove it.
  4. A sorted array is given. Write a code to search for two numbers whose sum is equal to a given no N.
  5. Two sorted arrays are given. 2nd array size is enough to store the all elements of array1 and array2. Write a code to merge array1 and array2 and create a sorted array without taking any extra array.
  6. A number is given. Write a code to replace a particular digit in that number with another digit. Ex: input: 568456955, output: 968496999(replacing 5 with 9).
  7. What is thrashing?
Round 2:

  1. Two link lists are merged after some point. Write a code to find that node.
  2. One unsorted array is given. You have to replace a number which is more than that number and position wise nearer in right side. If such number is not available no need to replace.             Ex: input: 29763485 output: 99884885
Note:

All problems can be solved using brute force method. Try to solve the problem with less complexity. For all problems they will tell you to find the bugs in your code. If it is there you have to fix it. You have to write test cases for all codes. You also have to analysis the complexity of your code.

Source: Dipanjan Roy(M.Tech(I.T))



No comments:

Post a Comment