" 4), which will vary the value of k for many times. "

I think to cover up this problem..
1. we can store the starting and ending numbers for every K in another
file (with file name of every set) and then sort the file names
according to the starting values for every K set,

2. hence creating an index based on the starting values of every set..

3. so to check if a number is in a set or not we will simply have to
perform a binary search on this index

4. and then for every matching set scan that particular set's file to
see if the number is present or not.

Thus the time for checking multiple instances will be reduced to some
extent..

Regards,
Prateek.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to