Company: Twilio
Difficulty: medium
Maximum Networks A facilities team is rolling out several independent computing clusters across one floor of an office building. A cluster may be formed from the computers on that floor only if all of the following hold: They must be adjacent to one another. There must be a minimum number of computers. The total processing speed of the network (the sum of each computer's processing speed) must be at least a certain threshold. A computer can only belong to one network. Given the processing speeds and order of the computers, as well as the network constraints, determine the maximum number of networks that can be formed. Function Description Complete the function maximumNetworks in the editor. maximumNetworks has the following parameter(s): int speed[n] : speed[i] denotes the processing speed of the i th computer int minComps : the minimum number of computers each network must have long speedThreshold : the minimum total processing speed a network must have Returns int : the maximum numbe