Top K Frequent Elements at Apple
Medium65.9% acceptance
This problem has 76.1% frequency at Apple.
Problem Description
Given an integer array `nums` and an integer `k`, return _the_ `k` _most frequent elements_. You may return the answer in **any order**.
Read full problem and hintsTopics
Also asked at 52 companies
More Apple Questions
LRU CacheMediumTwo SumEasyNumber of IslandsMediumMerge IntervalsMediumBest Time to Buy and Sell StockEasy
View all Apple questions