Amazon Interview experience | Set 127 (For Internship)
First interview round
1. Find the second largest element in an array.
2. Given a sorted array which can have repeated elements, find the occurrence of an element. (Most optimal solution is O(logn) – Using binary search to find start and end occurrence)
3. Make a data structure and implement an algorithm to print all the files in a directory. (the root directory can have sub-directories too.)
I used an n-ary tree and BFS to print files. It can also be done using Stack.
Second interview round
1. He asked some question about my CV
2. Print a matrix diagonally.
3. DFS of binary tree, n-ary tree.
4. Then he asked some question from other subjects.
OS – Scheduling
DBMS – Normalization, Transaction
OOPS – Abstraction
Last Updated :
24 Jun, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...