GroMo interview question

Get top k most frequent element