LinkedIn interview question

How would you design a URL shortener?