Allegion Interview Question

asked to write simple programming puzzles like finding duplicate numbers in the given array