Company: Amazon_july
Difficulty: medium
Minimum Operations to Adjust Prices Problem Description The manager of the Amazon warehouse has decided to make changes to the inventory by changing the prices of the products. Currently, the inventory has n products, where the price of the i th product is represented by the array element prices[i] . The manager is given two integers: k - which is the maximum amount by which a product's price can be adjusted (increased or decreased) in a single operation, and d - which represents the target price difference. The goal is to ensure that the difference between the highest and lowest prices in the inventory is strictly less than d . In order to make changes to the inventory, the manager can do the following operation any number of times: The manager selects two indices x, y ( 1 ≤ x, y ≤ n ), and an integer p ( 1 ≤ p ≤ k ). The manager increases the price of the product x by p . The manager decreases the price of the product y by p . Given n products, an array prices , and the t