Interview with an Amazon engineer.

A System Design interview with an Amazon engineer

Watch someone solve the amazon ranking system problem in an interview with an Amazon engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.

Interview Summary

Problem type
Amazon ranking system

Interview question
1)
Design a system to rank products within categories by a rolling average of their purchase count.

Interview Feedback

Feedback about Dialectic Singularity (the interviewee)
Advance this person to the next round?
No

How were their technical skills?
4/4

How was their problem solving ability?
2/4

What about their communication ability?
3/4

Thanks for taking the time to interview with me today,

We spend the last 10 minutes of the interview talking about feedback and ways to improve, but I want to sum up a bit of what I said to you here:

  1. Make sure to ask more clarifying questions; if you aren't sure of something please ask, even if it's not time to ask yet.
  2. When you draw out your high level design, make sure to start with a specific place that the request starts/ends.
  3. Calculate usage; it's worth it to just spend 2-4 minutes calculating how much usage is going to be used by the service.
  4. State assumptions that you are making.

Overall, you were really close, you did a good job at talking and saying what you are thinking, that is a really great trait! Keep it up!

Feedback about Fabled Goblin (the interviewer)
Would you want to work with this person?
Yes
How excited would you be to work with them?
4/4
How good were the questions?
4/4
How helpful was your interviewer in guiding you to the solution(s)?
4/4

Interview Transcript

Fabled Goblin: Hello.
Dialectic Singularity: Hey, how's it going?
Fabled Goblin: I'm doing well, yourself?
Dialectic Singularity: Pretty good!

Fabled Goblin: Awesome. Well, welcome. Welcome to the interview. So before we get started, when I went to go check on information about you and what this interview was for, it just says, you want to practice high level design, and it says that it has no other information. So before we start, could you tell me a little bit about yourself maybe what experience you have, what you're studying for, so I can better plan this accordingly to help you meet your goals.

Dialectic Singularity: Yeah. Yeah, of course. Thanks for I guess, like doing that. So I've been a developer in the Bay Area for about four years. And I guess I'll just kind of tell you the companies. So for the first year and a half, I was a big data engineer at Salesforce. And there, I did, you know, kinda like Hadoop, Spark stuff, and some database tunings. And for the past two and a half years, I've worked for this startup that worked in real estate. And that was a lot more of vertically, my work is a lot more like vertically integrated. For the entirety the time there, I worked on the pricing team. And the majority of the time there, I worked on the resale pricing team. And there, a couple of projects where, I have some more like technical and projects that are more product base. So a technical project I did was redesigning our, like unit economics pipeline to be more accurate for the homes that we have in our inventory. And a more current product base work I did was we making, basically making the entire process by which we price homes for resale? So originally, it was very, I guess, I would say organically grown and and so it got inefficient. And then we decided to read through it with like, you know, models. Yeah, so that's some like history. And I guess in terms of like, you know, what I'm, like looking for... So I have an interview tomorrow with Stripe, and I'm interviewing for a back end, I guess, like financial data API role. So yeah, I guess a something with back end. And you know, maybe APIs would be good for this.

Fabled Goblin: Okay. And, um, you I saw you switch to Python right off the bat. Generally, with system design, it's a little bit less writing code so much as more high level design, do you want to be more specific into API writing and like the nitty gritty of it, or do you want something that's more high level system design? Like when I would give someone when they're interviewing with me?

Dialectic Singularity: Let's do a high level system design. Yeah, I think I just switched to Python just by habit. But text is probably better for this.

Fabled Goblin: But I just want to make sure, because if you wanted like a, like an in depth, like design a specific type of thing that would be coded out, I can do that too, but I just wanted to make sure that we're on the same page.

Dialectic Singularity: So yes, you just high level.

Fabled Goblin: Okay. Can I give you a question that I like to ask people at Amazon? I know it's not Stripe, but I'm sure that there will be some similarities. And, yeah, I have a couple things. First of all, would you like to design something that's very, that's going to be very specific to design a thing? Or would you want something that just covers system design in general, that's more of a generic, generic thing to design?

Dialectic Singularity: Um, I think generic, I guess. Yeah. Like, I don't know what you know, the Stripe system designs going to be. I couldn't find any like, well, Mmm hmm.

Fabled Goblin: Okay well I'll give you system design that I would normally give at Amazon.

Dialectic Singularity: Yeah, that's fine. That's very fine.

Fabled Goblin: Okay, I'm sorry. I just don't know what I don't know what they're gonna ask you at Stripe.

Dialectic Singularity: But yeah, well, well, I just like was looking and like to see if I could find like, example problems. And I actually could see a couple, but I mean, those I can look at myself. Yeah, just give me a just, you know, give me something new.

Fabled Goblin: Okay, and if you've heard this before, tell me and I'll give you something else. What I don't want to have happen is you just regurgitate something you already know. Because that's not very helpful.

Dialectic Singularity: Yeah, yeah, for sure.

Fabled Goblin: Okay, so on Amazon, when you're browsing the website amazon.com. And you look at products, you see the products are ranked within categories. So if you're looking at like phones, you can type in like iPhone six and iPhone six has some sort of rank within cell phones and then some other rank within electronics. And it might be in a few categories. It has different ranks within each category. I would like you to design the sales rank by category feature.

Dialectic Singularity: Find the sales rank by category feature.

Fabled Goblin: Yeah.

Dialectic Singularity: Okay. So I guess my first question is like, what's the scope of this? By which I mean, you know, there's obviously a frontend component where you have to, like, I guess, like, look at it and also a backend components, where like, you know, ranking mechanisms.

Fabled Goblin: So let's assume that you don't care about the frontend, some other frontend UI person is going to deal with all of that, your service just keeps track of where products are ranked within a specific category. So let's say that you are given, let's say, Amazon, hypothetically has maybe like 10 million products, and 1000 categories, but they can be a many to many relationships. So each product can have multiple categories, and each category can have multiple products.

Dialectic Singularity: Right. Got it. Amazon has 10 million products and 1000 categories roughly. Okay, cool. Um, let's see how...

Fabled Goblin: Since you're only dealing with the back end, I don't want you to think about any front end stuff, just assume that when the page loads, it sends a request to your service to get the rank of products. So if someone's looking at a specific category, they should be able to get the product from the category, if someone's looking at a product, they should be able to get the category from the product, they should be able to find the ranks of that in any combination. If someone buys something, you can assume that it recalculates its rank, and rank is a rolling average, it's not going to be something that is set in stone.

If you want to dive into more detail or need any specific information about the content of the interview, please let me know.