Pergunta de entrevista da empresa Yelp

System design and a simple algorithm question.