Pergunta de entrevista da empresa Microsoft

Debugging some code, and then solving a question