Find duplicate entry in an array of integers between 1 and 1,000,000