Talk:Element distinctness problem

In the "Generalization: Finding Repeated Elements" section, third paragraph, it states "The above algorithms rely only on the test of identity of the elements." This line seems ambiguous. Do we mean that we can only make equality queries of the form (A[i] =? A[j])? Then we do *not* have an O(n log(k)) algorithm. The O(n log k) algorithms need to be able to do a binary search in a sorted data structure. Indeed, I think with only equality queries the element distinctness problem needs all pairs to be queried. Deeparnab (talk) 00:47, 12 December 2017 (UTC)Deeparnab

Hm, I dont really get it... Using a hashtable of the elements I could take each element (O(n)) and check it against the hashtable (O(1)) and setting up the hashtable is again n times O(1) so I have n+n+1 = O(n) ...
 * Yes, that's what the last sentence of the second paragraph says. But nevertheless, it's harder in certain standard models of computation. —David Eppstein (talk) 15:23, 9 May 2012 (UTC)