Company: Amaozn_27sep
Difficulty: medium
Get Minimum Removals Problem Description Amazon developers are building a prototype feature that helps customers manage their cart within a given budget. You are given: An integer budget , representing the budget of the customer. An integer array cart_items of length n , where cart_items[i] represents the price of the i th item. For each index i ( 0 ), consider the sub-cart containing items from index 0 to i (inclusive), i.e., sub-cart = cart_items[0...i] . For this sub-cart, determine the minimum number of items required to remove so that the total price of cart items does not exceed the budget . Note that the item at index i cannot be removed. The task is to return an array of length n , where the value at index i is the minimum number of removals required for the sub-cart ending at i . Complete the function getMinRemovals in the editor below. getMinRemovals has the following parameters: int cart_items[n] : the prices of the items in the cart int budget : the budget for purchases Ret