Pregunta de entrevista de Apple

Systems design question and LC.