ION Group interview question

Leetcode about frequency and topK elements