Pergunta de entrevista da empresa Google

one coding question on consectuive numbers in array