American Express Interview Question

Find duplicate in an array