Classic design questions practice
45 min · Advanced
Each classic design question has a skeleton you can say in ten minutes and a set of follow-ups that test whether you understood it. These drills practise both: outlines against the clock, spotting flaws, picking a fan-out strategy with numbers, and fixing the small piece of code interviewers like to ask for.
Topics in this lesson
- Timed outline: URL shortener and Pastebin in 10 minutes
- Find the flaw: a weak notification design
- Choosing a fan-out strategy for three feeds
- Fixing a base62 encoder bug
- Interview drill: the follow-up questions
Key points
- A 10-minute outline: requirements, estimates, API, key idea, data and read path, extras.
- Find flaws with four questions: what waits, what retries, what fails, what blocks.
- Choose fan-out with numbers: push inserts vs pull lookups and the largest account.
- Test an encoder with a round trip; answer follow-ups as problem plus fix.
Interview questions this lesson answers
- You have 45 minutes for "Design a URL shortener". How do you spend the first 10?
- How is Pastebin different from a URL shortener?
- How do you decide between push and pull fan-out?
- Write a base62 encoder. How would you test it?
- What is wrong with sending notifications inside the order request?
- An interviewer says "it depends" is not an answer. How do you use it well?
- A short link goes viral. What happens in your design?
Sign in to continue this lesson
Create an account to read every lesson, practise with the exercises and keep track of your progress.