AI & Technical question

How does TinyURL work?

Practice this question out loud. An AI interviewer asks it, follows up like a real interviewer would, and scores your answer. Type or speak.

Start a mock interview on this question · Mock interview from a job description

What this question tests

A PM-facing technical explainer question testing whether the candidate can describe a simple system's mechanics clearly enough to reason about its trade-offs, not deep implementation detail.

How to approach it

  1. State the goal: TinyURL takes a long URL and returns a short, unique alias that redirects to the original when visited.
  2. Explain the core mechanism: when a long URL is submitted, the service generates a short unique key (e.g., a 6-7 character code) and stores a mapping from that key to the original URL in a database.
  3. Explain key generation: either a counter-based approach (base62-encoding an incrementing ID) or a hash-based approach (hashing the URL and taking a short prefix, checking for collisions).
  4. Explain the redirect flow: when someone visits the short URL, the service looks up the key in the database and issues an HTTP redirect (301 or 302) to the original long URL.
  5. Discuss trade-offs as a PM would: 301 (permanent) redirects are cacheable and faster but lose the ability to track click analytics on every visit, while 302 (temporary) redirects allow tracking every click, which matters if analytics is a product goal.
  6. Mention scaling considerations: the lookup needs to be fast at high read volume, so a key-value store or cache (e.g., Redis) in front of the database is a natural choice.

What a strong answer includes

Common mistakes

Likely follow-up questions

More ai & technical questions

More questions from Google

Learn the skill behind it

Chapters of the AI PM course that teach what this question tests.

Preparing for a specific role?

Book summaries for this kind of question

Browse all 4,000+ questions in the bank