Segment Tree Approach
Intuition\n Describe your first thoughts on how to solve this problem. \nFor any request which arrives at arrival[i], we need to find the first server starting 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nFor any request which arrives at `arrival[i]`, we need to find the first server starting from $$server_{(i\\%k)}$$ till the last server which becomes free at or before time `arrival[i]`.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nCreate a SegTree which stores the point of time when each of the server becomes free. For example, if a server was alloted task $$i$$, then it would become free at $$arrival[i]+load[i]$$. Initialize all nodes of the segment tree with all zeros. Also implement a function `findServer(int l, int r, int target)` which finds the first server starting from $$server_l$$ till $$server_r$$ which becomes free on or before the `target` time. \n\n\n# Code\n```\nclass SegTree {\npublic:\n    int s, e, mini;\n    SegTree* lChild, *rChild;\n    SegTree(int l, int r) {\n        s = l;\n        e = r;\n        if (s == e) {\n            lChild = rChild = NULL;\n            mini = 0;\n        }\n        else {\n            int mid = (s+e)/2;\n            lChild = new SegTree(s, mid);\n            rChild = new SegTree(mid+1, e);\n        }\n    }\n    void update(int ind, int newVal) {\n        if (s == e) {\n            mini = newVal;\n        }\n        else {\n            int mid = (s+e)/2;\n            if (ind<=mid) lChild->update(ind, newVal);\n            else rChild->update(ind, newVal);\n            mini = min(lChild->mini, rChild->mini);\n        }\n    }\n    int findServer(int l, int r, int target) {\n        if (l>e || r<s) return -1;\n        if (l<=s && r>=e) {\n            if (mini > target) return -1;\n            if (s == e) return s;\n            if (lChild->mini <= target) return lChild->findServer(l, r, target);\n            return rChild->findServer(l, r, target);\n        }\n        int temp = lChild->findServer(l, r, target);\n        if (temp != -1) return temp;\n        return rChild->findServer(l, r, target);\n    }\n};\n\nclass Solution {\npublic:\n    vector<int> busiestServers(int k, vector<int>& arrival, vector<int>& load) {\n        SegTree* st = new SegTree(0, k-1);\n        unordered_map<int,int> endTime;\n        vector<int> ans(k);\n        for (int i=0; i<arrival.size(); i++) {\n            int server = st->findServer(i%k, arrival.size()-1, arrival[i]);\n            if (server == -1) server = st->findServer(0, i%k-1, arrival[i]);\n            if (server != -1) {\n                endTime[server] = arrival[i] + load[i];\n                st->update(server, arrival[i]+load[i]);\n                ans[server]++;\n            }\n        }\n        int maxi = *max_element(ans.begin(), ans.end());\n        vector<int> finalAns;\n        for (int i=0; i<ans.size(); i++) if (ans[i] == maxi) finalAns.push_back(i);\n        return finalAns;\n    }\n};\n```
['Segment Tree', 'C++']