Domanda di colloquio di Meta

One algorithm question and some follow-up questions.