Design a URL shortener
medium 45 minTurn a long URL into a short code and redirect anyone who opens it.
Base62 codes and a tiny in-memory shortener
Read it, run it, change a line and run it again.
Loading editor…
A single process with a dict and a counter. Production replaces the dict with a database and the counter with range allocation.