Get Minimum Time

Problem Overview

  • Minimize total time to execute n processes by optionally splitting even-sized sets or executing them as a block per rules.
  • Input: n (power of 2), k high-priority indices, normal_time, priority_time; output: minimum total execution time.
  • Block time: normal_time if no high-priority; else priority_time * x * l, where x = high-priority count and l = block size.
  • OS scheduler context: assign processes to processors with split-or-execute choices.
  • Salesforce coding interview problem and interview question on scheduling optimization.

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: