Hello,
Giving back to the community. Finished Amazon onsite for L5. There were a total of 4 rounds: 1 system design, 2 coding system design round, and 1 pure LC round. ALL ROUNDS BEGAN WITH 15 MINUTES OF LP.
-
System Design
- Q: Design a top 50 movies recommender system for Netflix
- Started off with requirements (both functional/non-functional)
- Got the exact features we were trying to build, services that already exists or if I needed to build it
- Talked about how many users will be using this, RPS, metrics to measure
- Dived into what it would look like for customers, then transitioned to what it would look like for us
- High-level Design
- Talked about the flow of data (the second a customer clicks login into Netflix)
- APIs we might need
- Database to store our data (both for top 50 movies and user metrics)
- Low-level Design
- Dove deep into the APIs we were needing. Talked about what the implementation would look like (parameters, requests, etc)
- Talked a lot about the database and how we know it's top 50
- Dove down into primary/secondary designs, as well as cache
- Talked about read/write ratio, how to update for this particular scenario
- Talked about what would be needed to scale this upwards, where are the bottlenecks, and what happens during failures
- Overall: Felt good about this round. Could've gotten deeper into the data-flow, but I think I was running low on time due to the 20minutes of LP at the beginning. I wanted to get all of my thoughts out, but should've just been more patient. I definitely felt like this round is similar to on the job.
- If I had to score myself: 3.5/5
-
Coding System Design
- Q: Design & code a scheduling system to perform jobs and their dependencies
- Talked about the constraints/assumptions about this system.
- Talked about what were the use cases and inputs/outputs
- Designed a very high-level scheduling system that would take a job, dependencies and schedule a time for it.
- Utilized a queue to keep track of the jobs in the pipeline
- Utilized a hashmap to keep track of dependencies of a job before it can occur
- One to thing to mention here is, the dependency can also have it's own dependency
- Follow-Up: How do we do this across multiple systems? We shouldn't limit a single job to a single node performing our dependencies (i.e if we had 3 total nodes to utilize, and a job had 3 dependencies, each dependency should run on available nodes to reduce total time waiting)
- Overall: Felt really good. Had great rapport with the interviewer. I really felt like it was us together trying to tackle this challenge. I definitely felt like this round resembles on the job.
- If I had to score myself: 4.5/5
-
Coding System Design
- Design & code a hub system (hub 1..n) that a robot can go to. A robot can go either forward or backwards m steps.
- Talked about constraints and assumptions about this system
- For example, let's say we have 5 hubs. Robot is at hub 4. We tell robot to move 3 hubs forward. Robot should be at hub 2.
- Talked about what was the use cases and the inputs/outputs
- Designed a high level circular linked list that can have the robots go indefinitely in circles depending on m steps
- We shouldn't always move m steps if m steps is greater than hub. Use modular to get the actual diff.
- We need to be able to dynamically add new hubs (either at the front, end, OR after a given node).
- We need to be able to dynamically remove hubs
- Utilized a simple circular linked list. This solved a lot of the requirements from above
- Follow-Up: What if each hub had a time-to-expire (TTE)? When it's time, the hub needs to be removed automatically and the robot is NOT allowed to access it anymore.
- Overall: Felt like this could be improved a bit. I did get stumped a bit for the follow-up, but my interviewer was very collaborative and suggestive. Also felt like we were solving this challenge together. I felt like this round resembles on the job.
- If I had to score myself: 3.75/5
-
Pure LC Round
I want to stress that EACH ROUND BEGAN WITH 15 MINUTES OF LP. Please do not overlook this. Typical tell me about a time...
Results: Heard back the next day with a passing with flying colors. I seriously did NOT expect it to be this fast nor this positive for feedback. There was a lot of things that I felt like I could've done better or shouldn't have done to begin with.
LC Count: ~130 easy, ~140 medium, ~20 hard
* This is over the span of a year and a half
* I was also prepping for G and Meta
* It was very very very hard...I still can't do DP correctly lol :/
Will update with a link to offer compensation once I get the finalized numbers. Wishing you all the best of luck on your journey!