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 it up in wikipedia :)
basically, it is like a set - except you cannot iterate it.
you put some values in it, lets say 80k zip codes.
then you can test if a given string is definately NOT a zip code, but you will eventually get false positives if you insert too many zip codes.
the memory consumption of this structure is quite small.
what is its name, and is there an implementation in java?
In telecommunication, data compaction is the reduction of the number of data elements, bandwidth, cost, and time for the generation, transmission, and storage of data without loss of information by eliminating unnecessary redundancy, removing irrelevancy, or using special coding.
Arrays. An array is a linear data structure that holds an ordered collection of values. It's the most efficient in storing and accessing a sequence of objects.
Arrays. An array is the simplest and most widely used data structure. Other data structures like stacks and queues are derived from arrays. Here's an image of a simple array of size 4, containing elements (1, 2, 3 and 4).
I believe you are looking for a Bloom Filter.
Here is a Java implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With