System Design · Senior · Question 17 of 75
What is a Bloom filter useful for?
- ✓Correct answer: Quickly checking "definitely not / maybe" in a set
- 2Exactly counting the number of unique elements in a set
- 3Sorting a billion records without using memory
Explanation
A Bloom filter never gives false negatives but allows false positives. Example: quickly rule out usernames that are definitely free, or URLs that are definitely not cached, before going to the DB.