I had my amazon interview few days back in my campus.
First round was a simple round. It had 20 MCQ questions on C/C++ and 2 coding questions. The coding questions were:
1.) You have given an array in which numbers are first increasing and then decreasing. Find the maximum element in O(log n).
2.) Swap the data of alternate nodes of a list.
We were given 90 minutes for 22 questions. For objective questions, you should be clear with virtual functions, inheritance, data types etc.
In this round, we were divided in groups. And a tree problem was given. We have to solve them individually.
My problem was:
Given a bst and two boundary values. Prune the tree if the node data lies outside the boundary values
In this round,
1) doubly linked list and a singly linked list. Both iterative and recursive. Which one is better approach and why?
2) Can you reverse a list in less than O(n)?
3) Differences between list and array. Which data structure you like and why?
4) How will you find the kth node from last in a list? Discussion on optimization
5) Given a string. Print all permutations of it. Discussion on time complexity and optimization.
1) Interleaving of a string. A big discussion on various test cases. Your code should handle the case if the string contains repeated characters.
2) Check if a binary tree is a bst or not
3) find diameter of a tree.Follow up how will find the height of a binary tree?
Round five: Problem Solving round
1) Given an array of heights of poles. Find the no of poles which are visible if you are standing at the ith pole.
2) You have a you tube video. A person watches the video in random order. You have given the start and end time of various intervals he watched. How will you confirm whether he has watched the full video or not.
3) Given a number. How will you find the next greater number with same digits.
Round Six: (HR round)
1) tell me about yourself.
2) why amazon?
3) Project discussions.
4) A little discussion on OOPS.
All the best Guys.. 🙂
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.