Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 362 Bytes

README.md

File metadata and controls

7 lines (5 loc) · 362 Bytes

This problem was asked by Microsoft.

Implement a URL shortener with the following methods:

shorten(url), which shortens the url into a six-character alphanumeric string, such as zLg6wl. restore(short), which expands the shortened string into the original url. If no such shortened string exists, return null. Hint: What if we enter the same URL twice?