Domanda di colloquio di Axienta

simple problem to check if the array contains 2 consecutive numbers only.