Problem Statement:
Given an array arr[] containing n elements. The problem is to find the maximum number of
distinct elements (non-repeating) after removing k elements from the array.
Note: 1 <= k <= n.
Example
Input:
arr[] = {5, 7, 5, 5, 1, 2, 2}, k = 3
Output:
4
Remove 2 occurrences of element 5 and
1 occurrence of element 2.