Tech Mahindra interview question

Find duplicate of an array