Simulate a round-robin load balancer that assigns requests to the lowest free server.
Unlock detailed company stats for this questionUpgrade
Implement a prototype round-robin load-balancing algorithm for n servers numbered 1 to n handling m requests. Each request i arrives at arrival[i] and takes burstTime[i]. The balancer assigns request i to the available server with the lowest index. A server is busy from assignment until arrival[i] + burstTime[i]. If no server is available at arrival[i], the request is dropped and marked -1.
Similar to LeetCode 1606 (Find Servers That Handled Most Number of Requests) but with allocation to the globally lowest-index available server rather than circular offsets.
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
