1338. Reduce Array Size to The Half

    [LeetCode]1338. Reduce Array Size to The Half

    1338. Reduce Array Size to The Half Medium You are given an integer 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. Example 1: Input: arr = [3,3,3,3,5,5,5,2,2,7] Output: 2 Explanation: Choosing {3,7} will make the new array [5,5,5,2,2] whic..