← Questions

Encode and decode TinyURL

0
MicrosoftCodingLast asked Jun 2026

A coding interview question asked in Microsoft's technical phone screen, last asked Jun 2026. It tests hashing, encoding and design.

Implement an in-memory class that turns a long URL into a short one and back. Any short URL produced by encode must decode to exactly the URL that was encoded.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

hashing · encoding · design

Your code and the AI tutor open when you unlock this question.