Two heap solution: time O(k+n.log(k)), space O(k)
Code\n\nimport heapq\n\nclass Solution(object):\n    def busiestServers(self, k, arrival, load):\n        """\n        :type k: int\n        :type arrival: List
# Code\n```\nimport heapq\n\nclass Solution(object):\n    def busiestServers(self, k, arrival, load):\n        """\n        :type k: int\n        :type arrival: List[int]\n        :type load: List[int]\n        :rtype: List[int]\n        """\n        \n        # time O(k+n.log(k)), space O(k)\n        busy = [0 for _ in range(k)]\n        servers = [i for i in range(k)]\n        end_times = []\n        for i in range(len(arrival)):  # n times\n            s = arrival[i]\n            e = s + load[i] - 1\n            while end_times and end_times[0][0] < s:\n                _, sv = heapq.heappop(end_times)  # O(log(k))\n                heapq.heappush(servers, i + (sv - i) % k)  # O(log(k))\n            if servers:\n                sv = heapq.heappop(servers) % k  # O(log(k))\n                heapq.heappush(end_times, [e, sv])  # O(log(k))\n                busy[sv] += 1\n        ans, max_busy = [], -1\n        for i, b in enumerate(busy):  # k times\n            if b == max_busy:\n                ans.append(i)\n            elif b > max_busy:\n                ans, max_busy = [i], b\n        return ans\n\n```
['Python']