Get Min Operations

Problem Overview

  • Find the minimum number of operations to finish n parallel jobs; each operation runs one major job for x seconds and all others for y seconds (y < x).
  • Input: executionTime[n], x, y; Output: int = min operations to complete all jobs.
  • Constraints: 1 ≤ n ≤ 3e5; 1 ≤ executionTime[i] ≤ 1e9; 1 ≤ y < x ≤ 1e9.
  • Context: processor scheduling and parallel execution.
  • Source: Citadel interviews; a 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: