Philips Interview Question

finding duplication in an array