GE HealthCare interview question

Dsa:print k most frequent elements from an array (leetcode qn)