Company: Amazon_23july
Difficulty: medium
Processor Power Matching Problem Description A cloud hosting provider operates a large fleet of servers that offer on-demand computing capacity to its customers. At one of its data centers there are n processes waiting to run and m processors available to run them. The i th process needs power[i] to execute. Each processor can supply power somewhere within its own band, from minPower to maxPower . A process i may run on a processor j exactly when minPower[j] ≤ power[i] ≤ maxPower[j] . Given the power needs of the n processes and the supported band for each of the m processors, work out, for every processor: how many of the processes it is able to run the total power drawn by those processes Note: Processes run one at a time on a processor, so a processor's band applies to each candidate process independently. In other words, if processes i and j can both run on processor p , then minPower[p] ≤ power[i] ≤ maxPower[p] and minPower[p] ≤ power[j] ≤ maxPower[p] must each h