
Round 1: LP + Coding
The interview began with an in-depth discussion of Amazon's leadership principles. The interviewer asked me to prepare examples from past projects. The main topics were customer obsession, ownership, and deep research. Here, I mainly used my campus experience to explain, and if you don't have professional experience yet, using campus experience is a good option. I answered this part pretty well, and when the interviewer went into more detail, I was able to keep up with the pace. Then there were two coding questions.
Q1: Determine the maximum number of meeting rooms required.
Here, I used a greedy algorithm. First, I defined my own comparator, with the sorting rule being that meetings with earlier end times are prioritized. Then, I iterated through all meetings. Meetings with earlier end times were processed first. If the current meeting's start time was later than the current time, it could proceed. If not, it was skipped.
Q2: A variant of the House Robber dynamic programming problem.
This problem requires binary search within the range [min(nums), max(nums)]. Find the smallest value that meets the requirements, and verify if it meets the requirements by iterating through the nums array.
Round 2: Coding
Q1: Celebrity Search Problem.
As soon as I saw this question, I knew that the key to solving it was the definition of a celebrity. Everyone else recognizes celebrities, but celebrities do not recognize everyone else. This question was originally from LC, and I had practiced it before, so I solved it easily.
Q2: Sum of Distances in a Tree Problem.
My approach was to use DFS to calculate the count (the number of all child nodes plus the current node) and the distance from the current node to all subtree nodes. Considering that the path from all nodes to other nodes is: based on the parent node's answer, subtract (the current node to all child nodes) and add (the remaining number of nodes), we can determine: f(parent) : the distance from the parent node to all nodes.
Round 3: System Design
Q: Design the BookMyShow system
This is an OOP design problem, primarily involving User and Theater classes. Use SeatBook and Transactions classes, which will be called from the main class to address situations where two people attempt to select the same seat.
Round 4: LP+LLD
The interviewer started with leadership principles, then delved into my previous projects and posed numerous behavioral questions. This was followed by a low-level design (LLD) question: design a car rental system. I was asked to write a code segment describing the process of delivering a reserved vehicle to the customer. The questions in this round were not difficult, and I completed them with ease.
lf you encounter any difficulties or have any questions, please feel free to come here to find solutions.


