Statement
Given an array of integers, arr, and an integer, k, return the most frequent elements.
Note: You can return the answer in any order.
Constraints:
-
arr.length -
arr[i] - 1
knumber of unique elements in an array. - It is guaranteed that the answer is unique.