Amazon Interview | Set 85

1st Telephonic round

After few project and introduction related question.

  1. Write a program to find an element in sorted and rotated array.
  2. Write a program to print all path whose sum is equal to a given number path must start from the root node and it may or may not end at the leaf.

2nd Telephonic round

After 3-4 days

Some c/c++ question what is malloc how does it work and memory layout and allocation related questions

  1. Write a program to find longest repeating substring In a given string running code were required covering all base cases.
  2. U have given 10 files and you have given a string suggest data structure which ll facilitate efficient search of string in the file if string appears more than ones in that case u have to print line number and file in which they appear.

After 15 days I got cal that I have cleared the telephonic round and my F-2-F interview is going to take place in Hyderabad

F-2-F round 1

After introduction and project related questions

  1. Write a program to print a tree in vertical order asked more than one approach to do this problem and modified problem many times.
  2. Write a program to convert a tree to doubly link list in post-order fashion only change of pointer are allowed that is left pointer can work as previous and right pointer s as next.

This interview went well J

 
F-2-F round 2(Bar raiser)

Few question related to OS what is deadlock, Race-condition, Semaphore and many more, few question Related to DBMS what is Normalization define all normal forms(I directly told him I don’t remember I read it in 5th semester )

  1. Why amazon??
  2. Why do u want to leave company XYZ.
  3. Your biggest challenge till the date.
  4. Many project related question.

Data structure

  1. U have given 10 files each having 1 million integer in sorted order, physical memory have size of 3 million suggest method to extract 1 million integer in sorted form efficiently.
  2. Write a program to convert a decimal number into binary your code should work on both big endian and small endian machine. U have given a variable which tell u whether machine is big endian or small endian

DBMS and few bar raiser question made this round average L

F-2-F round 3

  1. You have given an n-ary tree write a program to check whether this tree is sum tree or not.
  2. Given an array write a program to find kth smallest element in the array. He was hardly interested in the solution he just want to know how many ways u can solve it solved using 5-6 method at the end he was satisfied with the answers.

F-2-F round 4

Longest one….this interview went on for 1 hour and 30 minutes but was interesting one(interviewer looked lyk a frustrated guy…some tyms I felt that he is going to punch me 😛 :P)

  1. You have given M array each of size n all array are sorted separately write a program to make a big sorted array of size m*n . during discussion he told me to prove many lemma like height of tree is log(n)( for n elements) sum of n natural number is (n*n+1)/2 and many more. He modified problem many times don’t use extra space do it in space etc. discussion went on for almost 1 hour but at the end he was happy with the solutions(I suggested 2 method and further optimization in them.
  2. U have given an binary matrix which is sorted row wise and column wise write a program to search a row in the matrix having maximum number of zeroes.

Finally this interview also went well he was happy with my performance

After 2-3 days I got mail from the HR that I m rejected LL reason was bar raiser … 1 advise to all don’t take BR round lightly it does not matter how well u performed in other round if u didn’t do well in BR round then there is no way u can make it. An average round tech interview is fine but average BR round means rejected.

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.


Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.