Meta interview question

They asked a leetcode Top K Frequent Elements