Visa Inc. interview question

Find the first duplicated number in an array.