- Arrays

Maximize the count of distinct elements in Array after at most K changes

Given an array arr[], the task is to find the maximum number of distinct numbers in arr after at most K changes. In each change pick any element X from arr and change it to Y such that L