one of the earliest data streaming algorithm.
problem.
Given the bag of elements and an integer . Find the values that occur more than times in
idea: two passes over the values in , while storing at most values from and their number of occurrences.
Assume the bag is available in array of elements, then a heavy-hitter of bag is a value that occurs more than times in for some integer