if the amount of bits in the output digit is greater than the amount of bits in any number under inspection, that number can be skipped without any loss of generality
It is an interview question:
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 1GB memory. Follow up with what you would do if you have only 10MB of memory.
My analysis:
The size of the file is 4×...
I just answered the day's most popular question...the accepted answer has 113 upvotes and I'm pretty sure that answer is completely wrong (sub-optimal)