# Amazon Interview Experience | Set 417 (For SDE- 2)

Last Updated : 20 Sep, 2019

Round 1:

1. Distance between twoÂ given nodes in a binary tree. I was asked to write the optimal approach for the this.
2. A group of people are seated in a circular table. After a while , each members takes a chit and writes his name along with the next person name (anticlock wise.)Â  Â . If such chits are given , re draw the table. A optimal approach was expected. eg. A – B – C- D – E – A
chits will be written as A-B
B-C
C-D etc
3. Same questions as above . if each member takes a chit and writes his neighbors name . re draw the table.

Round 2:

1. Given a Binary tree withÂ  root(R) , a node(N) and distance (k). find all the nodes at k distance from N. Optimal solution was expected.
2. Given a linked with next pointer and random pointer. Clone the linked List.

O(1) space solution was expected.

Round 3:

1. Given a string of arrays “cat,dog,god,act”. Print all the anagrams which comes first in list.
eg.Â  output is cat ,act,dog and god. Means all the similar anagrams should be printed together and the next print should be the one which comes earlier in the list.
Group Anagrams Together
hint : Trie approach was expected here.
2. Given a stream of input Integers, at any time get the median of those numbers.

Round 4:

1. Design Bookmyshow : HLD, LLD and different race conditions discussion and scalability discussions.

Round 5:Â

1. Given a input String and a patterns string. return all the start index of the input string whenever the anagrams of the pattern match with input string. eg.
in : abcbaabba
pat : ab
output : index 0
index 3
index 5
index 7
2. DesignÂ RedBus kind of appÂ : HLD, LLD and different race conditions discussion and scalability discussions.

Round 6(Hiring Manager):
1.Â Â Behavioral questions : conflicts, challenges, innovation

3. Reverse a stack using recursion.

Round 7(Bar raiser)

Â 1.Â Â Behavioral questions : conflicts, challenges, innovation

2. Project Discussions.

3.Â Next Greater element.
https://www.geeksforgeeks.org/next-greater-element/

Previous
Next