Asked to design a URL shortener and spent the first ten minutes just asking questions instead of drawing boxes
Old habit was jumping straight to a diagram, which always fell apart once the interviewer added a constraint I hadn't accounted for. This time asked about read-to-write ratio, whether custom aliases mattered, expected scale, before touching the whiteboard at all. Turned out the actual hard part of the problem was collision handling at scale, not anything about the shortening logic itself. Got the best feedback I've gotten on a system design round so far.
3 comments
- 0
AnonymousAnon Curious how you handled the actual collision resolution once you got into it, base62 with a counter or something hash-based? That's usually where I get stuck explaining tradeoffs out loud.
- 0
AnonymousAnon Collision handling at scale is such an underrated part of that problem, most explanations online skip straight to the hashing scheme.
- 0
AnonymousAnon The clarifying-questions-first habit is underrated advice. I used to lose five minutes to a wrong assumption almost every round before I started doing this.