Pergunta de entrevista da empresa Bloomberg

Iterating through an array to find a missing number