@yousaf traversing through the array and if elements have same hash
value doesn't mean that they are repeated. even two different numbers
can have same hash value,so its not guaranteed.

Regards
Priyaranjan
http://code-forum.blogspot.com

On Jan 16, 11:24 am, Yousaf <[email protected]> wrote:
> traverse the array and hash the elements. If an element is already in
> the hashtable, its repeated one.
>
> On Jan 15, 9:21 pm, nphard nphard <[email protected]> wrote:
>
>
>
>
>
>
>
> > Given an array of integers of size 'n' - consisting of 'n-2' unique integers
> > and 1 integer with a duplicate, find the repeated element in O(n).
>
> > Note: This is a converse of finding the unique element in an array
> > consisting of duplicates - which can be solved with the XOR technique - but
> > I am not sure if the same/similar technique can be applied here.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to