Assign Tasks to Servers
Problem Overview
- Assign each request to the least busy server allowed: any index from 0 to requests[i], with ties by smallest index.
- Input: integer servers and list requests; Output: list of selected server indices for each request; constraints not specified.
- Domain: load balancing and server scheduling in distributed systems.
- From Amazon 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:
