Process Queue
Problem Overview
- Given an array wait of process wait times, determine after each second how many processes remain as the front process is processed and any with wait time ≤ elapsed time are removed.
- Input: integer array wait; Output: array of queue sizes per second; constraints not specified.
- Domain: process scheduling and queue management with time-based expirations.
- From Amazon interviews; a classic 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:
