Encode and decode TinyURL

0
Remix

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.

MicrosoftTechnical phone screenLast asked Jun 2026
No answer yet. Write the first one; the best answer gets endorsed.