Amazon Interview Experience | Set 393 (On Campus For Internship)
Online Coding Round:-
There were 2 coding questions and 20 MCQ’s.
- Given an array find all the triplets having their sum of elements less than a given number k.
- Find The N-th Magic Number.
1st Interview Round(Face To Face):-
The interviewer was very friendly. He went through my CV and asked me if I had any project. To which I replied no and told him that I am currently on a project, and later I gave him a brief explanation of it. For those who didn’t do any project don’t worry much.
He asked me 2 questions
Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!
Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!
- Generating All the Possible Subsets(Subset Iteration).
- Slight Modification of BFS on a grid. I told him my approach, and he was satisfied with that.
After I told my approach for the 2nd question he told me to write a Pseudo Code for BFS in a graph.
He was the best interviewer I faced till now.
The interview lasted for around 45 mins.
Other people were given questions like
- The middle element in a linked list.
- Merge Sort in a Double Linked List.
- Merge Two Sorted Arrays.
- Given A Binary Tree, For every Leaf Node print sum of the values from the root node to the leaf node.
- Quick Sort
- LCA in Binary Tree and Binary Search Tree.
2nd Interview Round(Face To Face):-
This interviewer was also very friendly. He also had a good knowledge of Coding. He asked me how was my previous round, I replied that it went well. And later he asked me what questions I was asked in the previous round. I told him the questions which I was asked in the previous round, and also I explained their solutions.
He asked me 2 questions.
- Print the Binary Tree in A Spiral Order.
- lli stands for long long int in this question.
He gave me a question in the form of a function. And here goes the question.
Simple But Wrong Solution
I told him that the above code actually fails. He asked me why it fails. I answered him this way. The array a is actually in the function Append and once you leave the function the scope of this array ends. He asked me how to do it then. I had no idea. Later he told me that we have to allocate memory for the array using malloc. Later on, he explained to me how it works using heap memory.
For my friends, he asked the question in a different way(Merge Two Sorted Arrays).
Thanks to GeeksForGeeks For my interview preparation.
This article is contributed by Mandava Desik. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.