Pregunta de entrevista de Asana

some algorithm and design question.