Company: Ethos_2march
Difficulty: medium
Offloading Tasks Problem Description Given a set of n servers, each with varying workloads represented by serverLoad[i] where 0 , the goal is to optimize the server workload distribution by offloading tasks from servers. There is a limitation: the developer can manually offload tasks from at most k servers. The developer has an access to an advanced server load management tool. This tool operates as follows: It identifies the server with the highest workload, denoted as L, among the remaining servers. It efficiently offloads tasks from all servers with workloads strictly higher than L/2 in a single operation. Utilizing the server load management tool incurs resource costs. Minimize the number of times the tool needs to be operated while ensuring optimal server workload distribution and return the number of times the management tool is operated. Note: The order in which the tool is used and tasks are manually offloaded does not affect the final count. The developer has the flexibility t