Algorithms and Data Structures · Senior · Question 11 of 75
What does HyperLogLog estimate, and why is it popular?
- 1The median of a stream, using a single pass
- ✓Correct answer: The number of distinct items, in a few kilobytes
- 3The most frequent items, with exact counts
Explanation
It hashes items and tracks the longest run of leading zeros per bucket; a run of k zeros suggests about 2ᵏ distinct values. With about 12 KB it gives roughly 1% error. Redis PFCOUNT and analytics systems use it for unique visitors.