mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-07 10:00:55 +00:00
Update data_structures/hashing/bloom_filter.py
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
parent
9b014721e4
commit
c132d501b6
|
@ -2,7 +2,7 @@
|
||||||
See https://en.wikipedia.org/wiki/Bloom_filter
|
See https://en.wikipedia.org/wiki/Bloom_filter
|
||||||
|
|
||||||
The use of this data structure is to test membership in a set.
|
The use of this data structure is to test membership in a set.
|
||||||
Compared to python built-in set() it is more space-efficent.
|
Compared to Python's built-in set() it is more space-efficient.
|
||||||
In the following example, only 8 bits of memory will be used:
|
In the following example, only 8 bits of memory will be used:
|
||||||
>>> b = Bloom(size=8)
|
>>> b = Bloom(size=8)
|
||||||
>>> "Titanic" in b
|
>>> "Titanic" in b
|
||||||
|
|
Loading…
Reference in New Issue
Block a user