Compact data structure such as a dataset

I am looking for a specific data structure, but I forgot its name. if I knew the name, it would be trivial, I would just look at it on Wikipedia :)

basically, it looks like a set, except that you cannot repeat it.

you put some values ​​in it, say, 80x zip codes.

then you can check if the given string is definitely NOT a zip code, but you will end up with false positives if you insert too many zip codes.

The memory consumption of this structure is rather small.

what is its name and is there an implementation in java?

+5
source share
2 answers

I believe you are looking for a Bloom Filter .

Here is the Java implementation .

+6
source

I think you mean the Bloom filter . Here is a Java-based BitSet.

+3
source

All Articles