ByteDance Interview Question

The top k frequent elements