1. How to Approach a Design Question
1
The picture to keep in your head2
1.1 What is a system design interview, and what isn't it?3
1.2 What is the interviewer actually scoring?4
1.3 What's the step-by-step framework?5
1.4 How do you manage a 45-minute round?6
1.5 What questions should you ask first?7
1.6 What's the difference between functional and non-functional requirements?8
1.7 What's an API, and why define it before drawing boxes?9
1.8 How do you sketch the data model?10
1.9 What does a good high-level design look like?11
1.10 How do you choose what to deep dive into?12
1.11 How do you talk about trade-offs?13
1.12 What if you get stuck or don't know something?14
1.13 What are the most common mistakes?15
1.14 What does the bar look like: fresher vs SDE-2?16
Memory card and where the analogy breaks17
Practice: five levels18
Interview questions19
Solutions20
Sources21
Code lab1. How to Approach a Design Question
1.5 What questions should you ask first?
3 min read+10 XP
READ: understand the problem
At the architect's desk: Before drawing a single line, the architect asks five kinds of questions. What rooms do you need? How many people? How will you use the house (big parties or quiet evenings)? How quickly do you need it ready? And what must never go wrong (no wobbly railings with kids around)?
In the interview: Ask the same five kinds of questions. They spell SCALE:
| Letter | Ask about | URL shortener example |
|---|---|---|
| Scope | Which features are in, which are out? | Custom aliases? Expiry dates? Click analytics? |
| Count | How many users, how much data? | How many new links per month? How many clicks? |
| Access pattern | More reads or more writes? Any spikes? | Links are clicked far more often than they're created |
| Latency (and uptime) | How fast, how available? | A redirect should feel instant; links must work 24/7 |
| Exactness | How correct must the data be, how fast? | A link must never point to the wrong page; analytics can lag |
Two rules:
- Ask, then commit. If the interviewer says "you decide", state an assumption out loud ("I'll assume 100 million new links a month") and move on.
- Write the answers down where both of you can see them. You'll come back to them in every later step.
Memory code: "Ask about SCALE before you scale." Scope, Count, Access pattern, Latency, Exactness.