Hello friends, Amazon recently visited our campus hiring for SDE. They are usually the first or second company to visit our campus, which gives little time for preparation. so better prepare yourself in summer vacations (read g4g).
I had great fun preparing for the Amazon, and really enjoyed myself through the interview process. The process spanned across two days. The interviewers were really nice and I really felt really comfortable throughout the interview process.
Let me share my experience with you.
First round (1 hour 30 mins) (Apti + coding):
This was the online round, conducted on hackerank.
20 questions were asked from C/C++/Java outputs, OS, DS, Algorithms, etc.
and 2 coding questions were asked.
Q1) Given a linked list, check whether it is palindrome or not.
Q2) Given a matrix of NxM, consisting of alphanumeric characters, print the matrix spirally.
After this round around 30 students were selected from 250 students.
F2F 1:(1 hour 30 mins) (Technical):
This round started with some basic questions like ‘tell me about yourself’ and some questions on my projects.
after that coding questions were asked:
Q1) Given a matrix of NxM.
Now consider a submatrix in it having top-left coordinates as (x1,y1) and bottom right coordinates as (x2,y2).
Now many queries are performed in which (x1,y1) & (x2,y2) are entered.
We have to find the sum of elements in this sub-matrix in O(1) time complexity for each query.
1 2 3 4
5 6 7 8
9 1 0 2
3 4 1 5
(0,0)-(1,2) : 24
(1,1)-(2,2) : 14
Q2) We are given an alien language, in which we dont know the arrangement of the letters.Now we are given some words of that alien language in dictionary order.using those words we need to find the order the letters of the alien language.
Q3) We are given the preoder traversal of a BST, we need to create the BST using the given traversal.
But we can’t use inorder traversal(i.e. sort the elements and use the array.)
and also we need to create the BST in single traversal of the preorder list.
Q4) We need to reverse a Linked List using single pointer. (in other words : recurrsively)
He asked me to write the code for reversal.
After this round some students were selected for second round of the interview process.
Luckily i was among them.
F2F 2:(1 hour) (Technical):
This round also consisted of coding questions:
Q1) Given a tree, print the tree in Zig-Zag manner.
Q2) Given a sorted array, we need to find that element whose value is equal to that of its index value.
He asked me to do it in log(N) time complexity.
Q3) Given a tree, now the given tree is special as in this tree all node has only 1 pointer which points to its parent.
Now, in this tree we are given any 2 nodes, and we need to find their lowest common ancestor(LCA).
Hint: This question is similar to intersection of 2 linked lists.
In the end he asked me if i had any questions to ask.
Thanks to geeksforgeeks 🙂
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.
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!