Medium · Arrays & hashing

Top K Frequent Elements

Return the k values that appear most often. Any order is fine.

nums = [1, 1, 1, 2, 2, 3], k = 2

→ [1, 2]
Record your take

No one has solved it yet.