Niantic interview question

Find the duplicate number from an array.