Lounge<C++>

Today we're daydreaming about C++26 reflection
Ami
Aug 24, 2011 05:15
goodnight
Ami
Aug 24, 2011 05:09
it fails again
Ami
Aug 24, 2011 05:08
but if we assume a fixed number of bits to an int...
Ami
Aug 24, 2011 05:06
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
Ami
Aug 24, 2011 05:05
actually...I think I can salvage my answer
Ami
Aug 24, 2011 05:04
I didn't think of that
Ami
Aug 24, 2011 05:04
correct
Ami
Aug 24, 2011 05:02
and deleted it
Ami
Aug 24, 2011 05:02
Just realized why my answer was wrong
Ami
Aug 24, 2011 04:56
I don't think that's more efficient than the method I outlined in my answer
Ami
Aug 24, 2011 04:55
@Potatoswatter, never heard of it...reading about them now
Ami
Aug 24, 2011 04:53
any thoughts?
Ami
Aug 24, 2011 04:52
My answer:
http://stackoverflow.com/questions/7153659/find-an-integer-not-among-four-billion-given-ones/7170524#7170524
Ami
Aug 24, 2011 04:51
87
Q: Find an integer not among four billion given ones

SecureFishIt 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×...

Ami
Aug 24, 2011 04:51
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)