0

I want to parse files and read numbers which are stored as Strings and build the data structure to store the numbers.

Later in my application should provide method to check if a number is present in the list of numbers. These numbers will not fit into one long, but all the number can be represented with maximum of 512 bits.

I don't need to perform any maths operations on these number, but only search the presence of number.

Thought of storing the numbers in BitSet so that we can reduce the memory usage, but Maximum size of the BitSet is limited by MAX_SIZE of the Integer . Is there a better way to store the numbers for lookup?

ravthiru
  • 8,878
  • 2
  • 43
  • 52

0 Answers0