Algorithms and Data Structures · Senior · Question 11 of 75

What does HyperLogLog estimate, and why is it popular?

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.

Further reading

Problem with a question

Algorithms and Data Structures · Senior · question 11

Test yourself

Take the Algorithms and Data Structures · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz