read the question guys, only 2 mb of memory...
i would perhaps try to find the range of the numbers... say the range is 300
million here...
so i would maintain a count array, count[i]+=1 if on traversing the large
file i find a number from chunk i, here chunk can be decided suitably, for
example ith chunk means all numbers occuring between 10000i and
10000(i+1)... (chunk size decided upon the size of the RAM)... then suppose
each chunk should have say 5000 elements, so each count should have 5000
elements... suppose the jth count variable has less than 5k elements... so
on the nest pass, i will maintain a 10000 element bit array, and set
correcponding bit to 1 if the number is found in the file... after going
through the bit array once, we can find the desired number...

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

Reply via email to