medium10 pts · first answer countsstacks-and-queues
Task scheduler with a cooldown
A CPU runs tasks A, A, A, B, B, B, one per time slot. The same task must wait at least 2 slots before it runs again (idle is allowed). What is the minimum number of slots?
Discussion 0
Join free to post in the discussion.
Related questions
- Order rule of a stackBackend Developer
- Order rule of a queueBackend Developer
- Trace stack push and popBackend Developer
- Trace queue operationsBackend Developer
- Using a JavaScript array as a stackBackend Developer
- Cost of Array.shift in a queueBackend Developer
- Cause of a stack overflow errorBackend Developer
- Serving patients by severityBackend Developer