Given an array
arr. You can choose a set of integers and remove all the occurrences of these integers in the array.
Return the minimum size of the set so that at least half of the integers of the array are removed.
Input: arr = [3,3,3,3,5,5,5,2,2,7]
Sorting and then delete the number which with maximum frequency.
// time:O(nlogn) space:O(n)