Amazon Interview | SDE-1 (On Campus)

Round 1: This round was an online round on mettl. There were 2 coding questions and 28 multiple choice questions. The time limit was 90 minutes.

Question 1: Given an integer n, and an integer array of size n, return the number of inversions in the array. 0<=n<=1000. https://www.geeksforgeeks.org/counting-inversions/

Question 2: Given n and m and an integer array of size n*m, return the Maximum of sum of row + Maximum of sum of column if this array was a 2-d array of size n*m.



Example: n =2, m =2, Array [1, 2, 5, 6] return 19. Easy implementation question.

They shortlised around 50 students for the next round. Those who had done both the coding questions and some mcqs correctly were shortlisted.

Round 2: This was a F2F technical round. The interviewer asked me to introduce myself, and then started with coding questions.

Question 1: Top View of a Binary Tree. https://www.geeksforgeeks.org/print-nodes-top-view-binary-tree/

Question 2: Given the arrival and departure time of trains, return the minimum number of platforms required such that no train has to wait.  https://www.geeksforgeeks.org/minimum-number-platforms-required-railwaybus-station/

First had to explain the approach and write the code on paper, after this he asks to dry run some cases on the code written. Then he asked me if I had any questions for him, after this the interview ended.

Round 3: This was also a F2F technical round. The interviewer asked me to introduce myself, and then asked me some questions on relational and non relational databases, acid properties and transactions. Then he gave me a coding question.

Given the head of a linked list of integers, and 2 integers, we had to swap the 2 nodes. I told him, as this is integer linked list, we can just swap the 2 integers and not the pointers, and then said, if this was not an integer array, but had some other data of big size, then we can swap the nodes and do. He asked me to explain the second approach, and then write the code for it.

He then asked me to explain some oops concepts like polymorphism, difference between objects and reference, etc. Then he gave me other coding question.

Given an array of integers, for all elements in the array, return the just greater element in the right side of the array.


Array : [5, 3, 5, 4, 7, 6, 9 ]

return [6, 4, 6, 6, 9, 9, -1]

This can be done using balanced bst, starting from the end of the array, start constructing a balanced bst or avl tree, and search.

Then he asked me if I had any questions for him, after this the interview ended.

Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

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.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


5


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