Tufin interview question

Check for duplicates in an array in O(n) time.