Amazon visited our campus in the beginning of August. There was no eligibility criteria and 330 students approx sat for the online round.
Round 1 (Online):
It was an online coding round of two questions, and it really depends on your luck whether you’ll get an easy question or not (in my case they were easy, while some other candidates got lengthy DP questions).
- Given an expression in the form of a string “A+B=C”, where any two of A, B, and C were given, you had to find out the value of the third variable.
- Given a matrix, calculate the row with maxSum, and column with maxSum.
Around 50 students got through. This was followed by 4 technical F2F rounds, and they asked nothing from my resume, only Data Structures and Algorithms. Interviewers were friendly and kept giving adequate hints, they just want to see how well you can tackle a question.
- Given a n by n matrix, rotate each layer of the matrix by one element clockwise, so: [ 1 2 3, 4 5 6, 7 8 9 ] should become [ 4 1 2, 7 5 3, 8 9 6 ]. This is to be done in constant space.
- Given a linked list, find Kth node from its end in one single traversal.
- Given a linux cd command like “a/b/c/./d/../e”, you have to find the resulting directory, or report error if any.
- Given a Binary Tree, convert it into a doubly linked list without using extra space.
- Given an array of strings, group all the anagrams together.
- Linearise a 2D linked list in one traversal and without using extra space. Each node would have a right and down pointers. The down pointer may or may not point to a non NULL node.
- Check whether two nodes in a Binary Tree are cousins or not in one single pass.
- Which sorting algorithm would be appropriate to sort a line of almirahs according to their height so that my effort is minimum. (Selection sort)
Round 5 (Final Round – Bar Raiser):
Around 16 students qualified till this round. Only one question was asked which would require the application of multiple data structures to solve.
- Given an infinite stream of incoming strings with their timestamps, print a string only if it has not been printed in the last 10 seconds. A map based approach would not work because it can potentially grow to an infinite size with so many strings.
- So, if the timestamp-string pairs were as follows:
- 1 – foo
- 3 – bar
- 6 – foo
- 11 – bar
- 13 – foo
- It would print: [ foo, bar, foo ] (foo at timestamp 6 was not printed as foo was already received within 10 seconds in the past)
- This solution required the combination of both map and a deque.
I was rejected after the Bar Raiser, because my round 2 did not go very well. I could not propose a space optimized solution for the Binary Tree question. Your scores across all of the rounds will finally be added up.
Whatever solution you propose, you should try to optimize it as much as you can. And keep your fundamentals of DSA very strong as all Amazon wants in a candidate, is a very good aptitude for coding. And whatever happens is for the best, so don’t take rejection in any round very hard, immediately shift your focus toward the next company. You can cry all you want after you get placed. 😛
Best of luck.
- UHG Interview Experience | OnCampus- 2019
- MathWorks Interview Experience (EDG, Oncampus)
- ServiceNow Interview Experience Oncampus
- InfoEdge Interview Experience | OnCampus-2019
- Amazon Interview Experience | Set 167 (SDE I for 1 year 6 months experience)
- Amazon Interview Experience | Set 391 (SDE-2, 5.5 years Experience)
- Amazon Interview Experience | Set 243 (2.5 Years Experience)
- Amazon Interview Experience | Set 242 (1 Year Experience)
- Amazon Interview Experience | Set 241 (1.5 years experience)
- Amazon Interview Experience | 401 (3+Years Experience for SDE II)
- Amazon Interview Experience | Set 248 (4.8 Yrs Experience for SDE II)
- Amazon Interview Experience (For Experience - 2.8 yrs) | SDE 1
- Amazon Interview Experience | Set 429 (For SDE 2)
- Amazon Interview experience | Set 126 (For SDE-1)
- Amazon Interview Experience | Set 432 (For SDE-2)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.