Logger that reports its top K messages
Build a logger that receives messages over time and can return the k most frequent messages at any point. Choose structures so logging stays fast and the top-K query is efficient, and discuss what changes if only recent messages should count.
No answer yet. Write the first one; the best answer gets endorsed.
