Pergunta de entrevista da empresa Arista Networks

Find the first missing number in a consecutive array. For example, the missing number in [4, 5, 7, 8, 9] is 6.