OpenBook
  • Problems
  • Tracks
  • How it works
  • Pricing
Start practicingSign In
Problems/CRUD & REST

5. URL Shortener

Easy

Create short codes, redirect, and count clicks.

25 minute budget88.7% acceptancehashing · redirects

Requirements

  1. 01POST /links takes a url and returns a short code for it.
  2. 02GET /:code redirects to the original url and records a click.
  3. 03GET /links/:code/stats returns how a link has been used.

What the hidden tests check

  • Everything the interviewer tells you is checked.
  • Codes are checked for repeats across many creations.

4 more details are held back. In a mock interview they come out only when you ask the interviewer the right question; in practice they are listed in the workspace.

Sign in to start

Attempts, files and transcripts are saved to your account so the grader can review how you worked.

Sign inCreate an account
OpenBook

Practice for interviews where you build a feature with an AI assistant.

Early preview. Problems, grading and the interviewer are still changing.

Practice

  • Problems
  • Tracks
  • How it works
  • Pricing

Legal

  • Terms
  • Privacy
© 2026 OpenBook.