Process Execution

Problem Overview

  • For each processor, determine how many processes fall within its power range and the total power of those processes.
  • Inputs: power for n processes; minPower and maxPower for m processors. Output: for each processor, the pair (count, sum).
  • Constraints: n ≤ 1.2e5, m ≤ 2e5, values ≤ 1e8.
  • Context: AWS cloud server scheduling; asked in Amazon interviews; a common coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: