Get Minimum Removals
Amazon's data analysts are currently working on an exciting new prototype that focuses on data pruning. In this challenge, you are presented with an array of integers named numbers, containing n elements, and an integer called allowedDistinct. The objective is to strategically remove as few elements as possible from the numbers array so that the remaining dataset contains no more than allowedDistinct unique values.
In other words, given the input array data and the parameter max_distinct, your challenge is to determine the minimum number of elements that must be removed so that the resulting array has at most max_distinct unique elements.
To accomplish this, you need to complete the function getMinRemovals with the following parameters:
int numbers[n]: The input array of integer data.int allowedDistinct: The maximum number of distinct elements allowed in the pruned array.The function should return an integer representing the minimum number of elements that must be removed to achieve an array with at most allowedDistinct unique elements.
1Example 1

Constraints
Limits and guarantees your solution can rely on.
1 ≤ n ≤ 10^51 ≤ numbers[i] ≤ 10^91 ≤ allowedDistinct ≤ 10^5