I am currently in my 8th semester . I recently attended the off campus drive for SDE1 at Amazon. Here’s my journey.
Round 1:- (Written)
This was a written round . It was hosted on interview street.
It was a 90 minutes test with 20 mcq and 2 codes
1> Return the longest palindromic substring in a string
2> Count the number of 2’s in all number from 0 to n .
Mcq’s were based on ds algo,operating system and maths.
After two days I got a call from the hr that I have cleared the written and a phonescreen is to be scheduled.
Round 2:- (Phone screen 1)
This was supposed to be a 1 hour round. The interviewer shared a collabedit link.
1> Divide an array into 2 subarrays such that the absolute difference of their sum is minimum. It was then extended to divide into two subsequences .
2> Convert a sorted array to a balanced binary search tree.
3> Convert a linked list with positive and negative integers into a list with first all negative integers, then positive. order amongst negative and positive numbers to be maintained.
Generally if first phonescreen is convincing the next step is direct face to face interview , else one has to go through another phonescreen. I had one phonescreen only . After a month i was called for inhouse interviews . All arrangements were made by them .
Round 3 :- (Face to Face 1)
1> Define a BST. Now check if a binary tree is a BST
2> Given an array of size n, and an integer k. find minimum number in every subarray of size k
3> Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining
4> Given an array find all triplets whose sum is equal to a given number k
Round 4 :- (Face to Face 2)
1> Find the diameter of a tree.
2> Print the diameter of a binary tree . (U have only left and right pointers)
3> Assembly scheduling problem (Dynamic Programming paradigm)
Round 5 :- (Face to Face 3)
1> How to check if two sets are disjoint ?
2> How to implement hashing for a set .
3> Given n sets , give the minimal number of sets which must be removed so that the remaining sets are all disjoint (Variation of set packing problem)
The interviewer was interested in some greedy heuristic as he knew its an np complete problem and no solution can be better than exponential
4> You are given a matrix of 1’s and 0’s . The property is thatevery row of matrix is sorted in descending order . Return row with maximum number of 0’s
Round 6 :- (With senior manager)
Interview started with detailed discussion of projects.
1> Implement lastindexofastring(String s1,String s2) . If s2 is present multiple times return the last index of s2 in s1 , else return -1.
2> Given a paragraph of text, write a program to find the first shortest sub-segment that contains each of the given k words at least once. A segment is said to be shorter than other if it contains less number of words.
The interviewer then asked me if i had done something on multithreading . As i was not very confident so i said no and he dint go further .
He then asked me what is my biggest regret in my student life in college .
Amazon hr’s were extremely helpful. After 3 days I got a confirmation call that I was hired. Geeksforgeeks has been instrumental in helping a lot of people to land up in good companies. Keep up the good work 🙂
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
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.