Algorithm · Salesforce · Easy
We have a set of n servers, each associated with a capacity value stored in the array capacities. The servers are processed in the order they appear. We must group them into k batches: the first batchSizes[0] servers belong to the first batch, the next batchSizes[1] to the second, and so on, where batchSizes is an array of length k specifying the number of servers per batch. It is guaranteed that the total number of servers matches the sum of all batchSizes. For each batch,…
Checking your access…