I was recently interviewed for the position of SDE-1 at Amazon. It was a 3 round process:
On paper coding:
- Given a binary tree print it in vertical order. The problem is stated here: Print a Binary Tree in Vertical Order
- Given a linked list convert it into given format:
1->2->3->4->5->6 to 1->6->2->5->3->4
It was an in-person interview.I was asked only one question. He asked me about various approaches. With least space complexity, least time complexity, different data structure usage for the following problem:
Trapping Rain Water
- I was asked to implement a queue with any data structure, discuss its time complexity, why the particular DS was chosen etc.
- Second question was to find the number of islands given a graph, i.e. find number of disconnected graphs given a graph.
If you like GeeksforGeeks and would like to contribute, you can also write an article and 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
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.