Company: Linkdin_2feb
Difficulty: medium
Delete Products Problem Description A sales executive must sell various items in a bag, where each item has an ID number. It is easier to sell items with the same ID numbers, and some maximum number of items can be removed from the bag. Find the minimum number of different IDs the final bag can contain after removing the allowed number of items. Complete the function deleteProducts in the editor below. The function is expected to return an INTEGER . The function accepts the following parameters: int ids_count : The number of items in the ids array (referred to as n in constraints). int* ids : An array of integers representing the ID numbers of the items. int m : The maximum number of items that can be removed from the bag. The complete function signature is: int deleteProducts(int ids_count, int* ids, int m) Returns int : the minimum number of different IDs the final bag can contain. Examples Example 1: Input: ids = [1,1,1,2,2,3], m = 2 Output: 2 Explanation: The bag contains n = 6 ite