How does the HyperLogLog algorithm work?
The main trick behind this algorithm is that if you, observing a stream of random integers, see an integer which binary representation starts with some known prefix, there is a higher chance that the cardinality of the stream is 2^(size of the prefix). That is, in a random stream of integers, ~50% of the numbers … Read more