Amazon Interview Experience for SDE-1 (Off-Campus)
Round 1: Online Assessment
- Amazon Fresh Deliveries: Given all Locations list of co-ordinates (x,y) you have to find the X – closest locations from truck’s location which is (0,0). Distance is calculated using the formula (x^2 + y^2). If there is a tie then choose the co-ordinate with the least x value. Sample Input :
All Locations : [ [1, 2] , [1, -1], [3, 4] ] numOfDeliveries : 2 Sample Output : [ [1, -1], [1 , 2] ]
- The output list can be in any order. This question was basically K closest points to the origin (0,0) with added tie condition.
- Demolition Robot: Given a matrix with values 0 (trenches), 1 (flat), and 9 (obstacle) you have to find the minimum distance to reach 9 (obstacle). If not possible then return -1.
- The demolition robot must start at the top left corner of the matrix, which is always flat and can move on the block up, down, right, left. The demolition robot cannot enter 0 trenches and cannot leave the matrix.
Sample Input : [1, 0, 0], [1, 0, 0], [1, 9, 1]] Sample Output : 3
- This question can be solved by using BFS or DFS.
Round 2: Interviews
Generate the sequence of N magic numbers. A magic number is
- Consists of digits 4 and 5
- Must be an even palindrome
- Expression evaluation (using stacks). The expression may contain parenthesis or not .
- Difference between linear and non linear data structure.
- Internal working of the map, including its implementation.
- First non repeating character in a stream of data in O(1) time complexity.
- Creation of a binary tree.
Round 4: Technical Interview
- You must know how to calculate time and space complexities.
- In each round they ask you about the project you recently did/ the project you liked working on most/ most challenging work etc- so you should be prepared well for at least one project with in-depth details.
- Start with the naive approach for each question asked and then proceed with solutions with better space and time complexities.
- Behavioral questions were also asked in each round – Some questions asked were :
- Out of amazon leadership principles ,which one you identify yourself with and why ? Give real-life example.
- Was there any situation in which you went out of your designated responsibilities?
All the best !
My Personal Notes arrow_drop_up
Please Login to comment...