Daily challenge for 2025-11-24
328. Top K Frequent Elements
Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.
Example:Input: nums = [1,1,1,2,2,3], k = 2Output: [1,2]
Example 2:Input: nums = [1], k = 1Output: [1]
Run this challenge interactively in Python or JavaScript when the app loads.