I think we can do XOR operation Over all numbers and result will contain
number which appeared only once.

Correct Me If I'm Wrong


-- Prashant Kulkarni




On Mon, Oct 4, 2010 at 3:17 PM, malli <mallesh...@gmail.com> wrote:

> I have an array. All numbers in the array repeat twice except two
> numbers which repeat only once. All the numbers are placed randomly.
> Goal is to find out efficiently the two  numbers that have not
> repeated  with O(1) extra memory. Expecting linear solution.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

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

Reply via email to