On Aug 23, 5:00 am, Dufus <[email protected]> wrote:
> Idea is simple either to keep a count and emit elements with odd count
> (frequency) or XOR element with itself for each time it occurs in
> input and then emit elements which have non zero XORed result(which
> basically corresponds to elements with odd frequency).
>
> _dufus
>

Or just use a bit array and XOR the number's position with one, at the
end
the bits that are on have an odd count.

--
Geoff

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to