A simple algorithm for finding frequent elements in streams and bags | Synapse