read the first no. .
now ans= first no +1;
if now ans is encountered while reading the next nos. add 1 to ans.
i.e. ans++;



On Mar 17, 2:18 am, bittu <shashank7andr...@gmail.com> wrote:
> Given an input file with four billion integers, provide an algorithm
> to generate an integer which is not contained in the file. Assume you
> have 1 GB of memory.
>
> 2nd Part
> What if you have only 10 MB of memory?
>
> Thank
> Shashank

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@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