Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Amazon Interview Experience On Campus for SDE 1

  • Difficulty Level : Hard
  • Last Updated : 19 Aug, 2019

Key Focus: MustDoCodingQuestion(GeeksForGeeks), HackerRank

Written Round:

2 coding questions and  30 MCQ’s on mettl Platform ( ).
Total Time : 1.5 hr.

Coding Questions:
1.Minimum number of jumps to reach end ( )
Solved in O(n) time complexity.
2. Count Inversions in an array ( )
Solved using Merge Sort in O(nlogn) time complexity.

MCQ’s :
Questions on Trees(BST), Output Prediction of given Codes(Codes are given in C, C++  Languages).

In my case, I have solved both the coding questions with all test cases passed.

Round 1:

Introduction of both of us.

1.Asked about what Data Structure to implement HashMap other than bst, bbst, Heaps, Arrays.
Told about bst, bbst approaches and mentioned that I know implementation of these data structure approaches only, then he moved to next question.
2.Detect cycle in an undirected graph ( )
3.Find the first circular tour that visits all petrol pumps ( )
4.Maximum Path Sum in a Binary Tree ( )
5.Reduce the string by removing K consecutive identical characters ( )

For Question 3, 4 I had mentioned to interviewer that I already know the solution for those questions, so for that questions he only asked to explain logic to solve them without writing code.

For Question 2, 5 needed to write neat production code with all edge cases handled properly.

Round 2:

Introduction of both of us.

1.Efficient search in an array where difference between adjacent is 1 ( )
2.Asked to specify about all Normal Forms and why normal forms are used (DBMS).
3.Asked to specify process synchronization concept and ways to handle it and also asked to mention all the process scheduling algorithms.
4. LRU Cache Implementation ( )

For Question 1, 4 have to write neat production code with all edge cases handled properly.

Round 3:

Introduction of both of us.

1.In an n-array tree where each node can have an apple represented as 0(apple not present) or 1(apple present), then needed to find out path with maximum number of apples. Asked to optimize both time and space complexity.
Solved using Diameter of a Binary Tree technique with some modifications.

2. Given a bench with n seats and few people sitting, tell the seat number each time when a new person goes to sit on the bench such that his distance from others is maximum ( ). Here he extended this question by specifying that I need to find k such positions for k persons to sit. Needed to solve in optimal way.
Solved this using Heap Concept.

3.Asked about Producer-Consumer problem in Operating System and the asked to write a neat code for both producer and consumer solving their synchronization problem using Synchronization Mechanism without busy waiting. And also asked to extend the code to work in distributed environment.

For Question 1, 2, 3 have to write neat production code with all edge cases handled properly.

Bar Raiser Round:

Introduction of both of us.

1.Check for Majority Element in a sorted array ( )
Solved using Binary Search in O(logn) time.
2.Asked what happens when we enter a URL and how we are able to reach a site (Expected to explain about Domain Name System Concept).

For Question 1 have to write neat production code with all edge cases handled properly.

Note: For all the questions optimal solution is expected, hints are given if stuck to derive optimal solution. Similarly, for all the questions asked in interview they mentioned to write neat production code with all edge cases handled properly.

Verdict: I was Offered Full Time Employment (SDE 1) at Amazon.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!