# Amazon interview – Set 2

I am 2011 passed out from IIIT Hyderabad. I would like to contribute for CrazyforCode by sharing my experience of Amazon Interview process. This was for a SDE position in Bangalore.

I had one online test. After that 4 round of F2F interviews and I cracked it.

Round 1

Q1. Find next inorder predecessor in bst?
Q2. Given integer n. Generate all possible paranthesis.
Q3. Given a linked list having next and random pointer(random pointer can point any where in the SLL node). Generate copy of this linked list.
Q4. Given a bt and a 2d matrix M. where M[i,j]=1 if i is ancessostor of j. Initially all elements of M is set to zero. Feed this matrix?

Round 2

Q1. Given a sorted array(array can contain duplicates). Find the first occurance of given key elements in this array.
Q2. Now array is rotated..solve same
Q3. Spiral order traversal of bt.
Q4. Given a road network of a city. Each road represents an edge and need atleast one guard at any end of the road to put it in observation. Derive a algorithm to deploy minimum guard s.t that each road have atleast one guard.

Round 3

Q1 He asked me about my previous projects and how I approched them.
Q2. Implement queue using stacks.
Q3. Edit distance problem (DP)

Round 4

Q1. He asked me some simple c questions like memory allocation, dangling pointer, static etc.
Q2. related to projects
Q3. Find loop in linked list. Proof of algo.

Thanks Subhash Chandra for contributing this article. If you would like to contribute, mail us your interview experience at [email protected] We will like to publish it on CrazyforCode and help other job seekers.