# Before the buckle 347 】 【 OJ | force output K high frequency elements

Given an array of non-empty integers, return the elements with the highest frequency of k. The element is an integer, and the range of values is int. 1 ≤ k ≤ The number of different elements in the array, and the occurrence frequency of elements is different. Requirement: The time complexity of the algorithm is O(n log n), where n is the size of the array. Format of input data: integer array before semicolon and k after semicolon in input content. Example input: {code... } output: {code...