Program Entry: src/main/java/com/github/diskun/App.java The idea is mainly based on paper Efficient Computation of Frequent and Top-k Elements in Data Streams.