Open In App

# Amazon Interview experience | Set 327 (Off-Campus for SDE-1)

I was Invited to attend Interview at amazon Hyderabad for the position of SDE 1 and I had the following rounds.

Round 0 coding —

Round 1 Data Structure —

1. Given a tree return the number of elements for the level with the maximum elements.
PS : all null nodes between two non null nodes need to be counted and null nodes can have null children which also can be counted.
eg– [null,2,1,null,null,3,null] in this level all nodes between 2 and 3 will be counted i.e. 5
2. Asked about what data structures I knew and what data structure will I use to make a cache.the answer was Hashing.
3. Asked what data structure would i use for maintaining cricket scores.

Round 2 Algorithms —

1. Given a binary tree find out if it is a BST
2. Given a binary tree root and a node ,print all nodes at K distance from the node.
3. Given an array it can be of 4 types
• Ascending
• Descending
• Ascending Rotated
• Descending Rotated

find out which kind of array it is and return the maximum array.

Round 3 Design —

• Asked me the word breaking problem which I couldn’t solve and this round didn’t go well.

Round 4 Managerial —