Round1 : Online Coding Test (2 questions - 120 minutes)
2 Coding Questions :Can't remember exact question but both questions were releated to sorting.(will add if able to recall later)
Solved both within 2 hours.
Round2 :
Some discussion on the Amazon leadership principles.
Q1 : https://leetcode.com/problems/integer-to-english-words/
Solved but took 45mins. Interviwer couldn't asked next question.
The Whole interview took around 60 minutes.
Round3:
Happened after 2 hours
Started with 3-4 leadership principles questions, answered them based on experience.
20Mins discussion on data structures (stack,heap,queue..etc).
Q1 : Min stack in O(1) => was just asked for approach
Q2 : BFS question => was asked to code.(coded the main logic)
The Interviewer was satisfied with the approach and asked me to code the same.
Whole interview lasted for 60 minutes.
Round 4 :
Manager Round
Most of the interview was based on leadership principles.
Q1 => Intersection point in linkedList
Q2 => Given two dates tell weather they are exact/less/more than one month aprat. (A little unclear but intervier was ok with appraoch)
Solved both.
Round 5 : (Bar raiser)
Two SDMs were there.
Introduction then directly jumped to question.
Q1 => Given 1Million audio songs(duration of each will be given). write a optimised algorithm to give a playlist(any one playlist) of songs for a given time as input. (with sum of durations equal to given input).
If it is not possibe to create a playlist of exact given time then output nearest possible time lesser than input time.
I took some time then told him as songs are 1M we can create an array of duration. then we can treate it as question like find a combination with sum less than or equal to given input.
wrote recursive solution to include/exclude a particular song.
Time complexity : 2^N ...where N = 1Million.
Couldn't memoize because we had to give the exact songs not no. of playlists possible.
Interviewer just said ok and didn't told anything or gave any hint or direction. jumped to LP.
Got rejection mail from Amazon HR next day.
Reason => Bar raiser went bad as expected.
If possible Can anyone please tell, what could be correct approach/solution of question of bar raiser round
Feel free to ask any questions.