Medium
Quiz
#347 Top K Frequent Elements
APPROACH
Given an integer array nums and an integer k, return the k most frequently occurring elements in nums. The result may be returned in any order.
1 of 4
1:00
What is the optimal approach for this problem?