Input: arr[] = {0, 2, 4, 3, 4}, K = 1
Output: 5
Explanation:
Increase arr[2] ( = 4) by K ( = 1). Therefore, new array is {0, 2, 4, 3, 5} which has 5 unique elements.
Input: arr[] = {2, 3, 2, 4, 5, 5, 7, 4}, K = 2
Output: 7
Explanation:
Increase 4 by 2 = 6.
Increase element 7 by 2 = 9
Increase 5 by 2 = 7.
The new array is {2, 3, 2, 4, 5, 7, 9, 6} which contains 7 unique elements.