← Questions

Encode and decode TinyURL

0
MicrosoftCodingLast asked Jun 2026

Implement a class that turns a long URL into a short one and back, in memory. Discuss counter-based versus random or hash-based codes, collisions, the same long URL submitted twice, and how the design would change if it had to scale. Only the title of this report was public.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding