2 ms·
Has anyone ever seen a linear-time algorithm to do a histogram without mutation? I mean like `Counter` from python. https://docs.python.org/3.8/library/collec
by recursive 7y ago
Has anyone ever seen a linear-time algorithm to do a histogram without mutation? I mean like `Counter` from python. https://docs.python.org/3.8/library/collections.html#collections.Counter https://docs.python.org/3.8/library/collections.html#collect...
- QuinnWilton 7y agoIt's not exactly the same, but that's pretty comparable to a g-counter CRDT, which is very straightforward to implement in a purely-functional language: https://github.com/QuinnWilton/distsys_training/blob/master/shortener/lib/shortener/g_counter.ex#L1 https://github.com/QuinnWilton/distsys_training/blob/master/...