If you have a 1Gb = 4294967296 bytes of available memory, you can use an array to mark if a number is on file or not.
Wladimir Araujo Tavares *Federal University of CearĂ¡ * On Wed, Mar 16, 2011 at 6:18 PM, bittu <[email protected]> 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 [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. > > -- 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.
