advancedData Structures & Algorithms~60 min
HyperLogLog
Estimate how many DISTINCT items a stream has seen using a few kilobytes instead of storing them all. Derive a bucket and rank from a hash, keep the max rank per bucket, turn the registers into a cardinality estimate, correct the small-range bias, and merge sketches — the count-distinct engine behind Redis PFCOUNT and analytics at scale.