Loading problem…
You're building an analytics dashboard that shows trending products, most viewed pages, or popular content. You need to find the top K most frequently occurring items from a dataset.
Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.