Return the K most frequent event types from a stream you may only iterate once, without holding every event in memory.
k may exceed the number of distinct events; return everything thenCommunity-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.