# Amazon Interview Experience | 399 (On Campus for full time)

Amazon came to my campus in the last week of July 2017.

The online round was hosted on HackerEarth platform.
It had 2 coding questions and 20 MCQs.

MCQs:
1 mark each and 0.25 negative mark.
Few MCQs were based on data Structures, algorithms, oops and Operating Systems, 1 or 2 from logical reasoning, networking and DBMS each.

Every interview round started with the cliche “tell me about yourself” and ended with “do you have any questions”.

Round 1:

1. Given a log file with product id and corresponding customer id for the products searched on Amazon, you need to find the most viewed product at the end of the day. If a product is viewed multiple times by a single customer its view count is increased only by 1. The number of products is very large so sorting, heap or hashing of product Ids is not feasible.

Solution– Use Trie data structure. After 10 minutes of discussion, I could come up this.
Production level code for insert and search in a trie was required.

What if k max viewed products were required.
During my discussion, he also asked me to write a hashing function.

Round 2:

1. Dfs of a graph.
2. Dfs of a n array tree. (Code was required)
3. Given a string s and a file with each word on a separate line, find all the words in the file which are anagrams of the string s. The interviewer asked me to tell all the possible solutions irrespective of the complexity. This continued for 10 min.
4. Given a m*n matrix find the number of paths from (0,0) to (m-1,n-1), at every block we either move 1 step down or 1 step right. Print all paths for the above question. A dp solution was required.

Round 3

1. Given a n*n matrix with distinct elements from 1 to n^2, find minimum number of bombs required to destroy all cells of the matrix. If we bomb a cell with value i, a cell with value i-1 if 4 adjacent to it will also be destroyed. (Code was required)
What if the numbers were not unique.
2. Find majority element in an unsorted array.
3. Find majority element in sorted array. (logN solution was required).
4. Print the elements of a tree diagonally.
5. Find shortest distance between two nodes of a tree where every node also has a pointer to its parent node and we can also directly jump from a node a to node b, where b is the mirror image of a and a and b belong to the two sub trees rooted at the root of the given tree. The mirror image may or may not exist.
6. Find the time required to pass information from root to all the nodes of the tree.

The interviewer then asked me which other noncoding subjects do I like. I said OS.
So he asked me several basic questions on OS.
What is-

1. os
2. Thrashing
4. Page Fault.
6. Multi processing
7. Difference between threading and multiprocessing.
8. Scheduling Algorithms.

Round 4
The famous Amazon’s Bar Raiser Round

1. My internship experiences.
2. Detail discussion about my summer internship project.
3. What is your favorite algorithm and why.
4. Toughest thing you did in college.
5. What are some leadership principles you learnt during your summer internship.
6. What was the non technical thing you learnt at your internship.

This was a telephonic round and went on for 34 minutes.

I recommend every one to prepare from InterviewBit, Hackerearth CodeMonk, Hackerrank,

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or 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 :

1

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