ByteDance interview question

The top k frequent elements