Layer 3 · Go deeper · 9 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
Seven base62 characters per hash. How often do codes collide?
Build-up · 7 steps
Made early, billed late
Where each kind of mistake is usually made in a 45-minute round, and where it usually costs you. The timings are illustrative.
Step 1 of 7
45 minutes, four phases
Scope and set-up to minute 15, design to 24, deep dives to 38, then the wrap-up. From minute 24, the bills arrive.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Minute 26. “What if two URLs get the same code?” You planned to hash each URL and keep seven characters.”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“It’s minute 30 and you haven’t started a deep dive. Analytics is still on your list. What now?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“Mid-design, the interviewer asks, “What if the restaurant goes offline after accepting?””
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Your design needs a message log, but you can’t remember how the product you’d name actually works.”
Your move. Pick an approach:
Build-up · 5 steps
The four-beat recovery loop
The URL-shortener round, minute 26: a number has just shown that hashing was the wrong call. The whole loop takes about 30–60 seconds.
Step 1 of 5
Notice
A number, a hint or the clock tells you something is off. Here, 500 collisions a day against “astronomically rare”.