CPU Task Processing with Priority Tasks and Splitting

CPU Task Processing

A CPU needs to process n tasks numbered from 1 to n. There are k priority tasks whose positions are given in the array priorityTasks.

The CPU can process a contiguou...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: