Company: Factset_20nov
Difficulty: medium
Problem Description Implement a prototype round-robin load balancing algorithm for n servers numbered 1 to n, handling m requests. Each request i arrives at time arrival[i] and takes burstTime[i] to execute. The load balancer assigns each request to the available server with the lowest index. A server becomes unavailable from the arrival time until completion (arrival[i] + burstTime[i]). If multiple requests arrive simultaneously, they are processed in order of their original indices. If no server is available when a request arrives, it is dropped (-1). Function Description Complete the function getServeIndex in the editor with the following parameters: - int n: the number of servers - int m: the number of requests - int arrival[]: the arrival time of requests - int burstTime[]: the burst time of requests Returns int[]: the 0-based index of the servers the requests are assigned to, or -1 if no server is available. Examples Example 1 Input: n = 3, m = 5, arrival = [2,4,1,8,9], burstTime