A Bloom filter offers an approximate containment test with one-sided error: if it claims that an element is contained in it, this might be in error, but if it claims that an element is not contained in it, then this is definitely true.
This may be useful for scenarios where you have a cache map but don't want to store empty values.
A Bloom filter offers an approximate containment test with one-sided error: if it claims that an element is contained in it, this might be in error, but if it claims that an element is not contained in it, then this is definitely true.
This may be useful for scenarios where you have a cache map but don't want to store empty values.
Here is a tutorial explaining how it works: http://llimllib.github.io/bloomfilter-tutorial There is an implementation in Guava: https://github.com/google/guava/blob/master/guava/src/com/google/common/hash/BloomFilter.java
And here is a nice explanation on how it works: https://www.geeksforgeeks.org/bloom-filter-in-java-with-examples/