The Short Address
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Interview Prompt
A URL shortener turns each new link's sequential row id into a compact slug. Encode a non-negative integer `n` into base 62 over the alphabet '0' through '9', then 'a' through 'z', then 'A' through 'Z', with the most significant digit first. The id `0` maps to the slug '0', not an empty string.
Summary
Every link needs a slug small enough to type by hand.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision