A1.bitmap.
A2.xor.
On Thu, Jun 09, 2011 at 02:45:48AM -0700, Dumanshu wrote:
> Q1. I have a file in which there are supposed to be 4 billion
> numbers,
> starting from 1 to 4,000,000,000 but unfortunately one number is
> missing,
> i.e there are only 3,999,999,999 numbers, I need to find the missing
> number.
>
>
> Q2. I have an array consisting of 2n+1 elements. n elements in it are
> married, i.e they occur twice in the array, however there is one
> element
> which only appears once in the array. I need to find that number in a
> single pass using constant memory. {assume all are positive numbers}
> Eg :- 3 4 1 3 1 7 2 2 4
> Ans:- 7
>
> --
> 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.
--
TAOCP
大地母亲在忽悠着你.
http://cn.linkedin.com/pub/feng-li/29/95b/640
http://gentoo-taocp.blogspot.com
http://groups.google.com/group/szlug
--
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.