logo

The DISTINCT in Your COUNT

Posted by gmcabrita |2 hours ago |5 comments

muth02446 2 hours ago[1 more]

If you are satisfied with an approximation of "DISTINCT", there is a facinating probabilistic algorithm by Flajolet and Martin

https://en.wikipedia.org/wiki/Flajolet%E2%80%93Martin_algori...

which fits on 10 lines and does not require sorting. Improved versions of it are LogLog and HyperLogLog.

thecaio 2 hours ago[1 more]

Hard to make a case to engange with an AI written article even if not fully slop