FastPrepFind the Busiest Servers
Problems/Find the Busiest Servers

Find the Busiest Servers

Citadel logoCitadel● MediumFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Citadel onsite interview. The first question of one onsite round was a well-known problem. The author later linked Find Servers That Handled Most Number of Requests. This version uses that rule for giving each request to the next free server in a circle. A server that finishes just as a request arrives counts as free. The output is in increasing order. It belongs to a later onsite round, after an earlier screen.

Our version is about 98% the same as the reported question.

There are k servers numbered 0 through k-1. Request i arrives at arrival[i] and takes load[i] time units.

Try server i modulo k first, then increasing server IDs with wraparound. Assign the request to the first free server in that cyclic order. Drop it if all servers are busy. A server completing at time t is free for a request arriving at t.

Return all server IDs that handle the largest number of requests, in increasing order.

Function

busiestServers(k: int, arrival: int[], load: int[]) → List<Integer>

Examples

Example 1

k = 3arrival = [1,2,3,4,5]load = [5,2,3,3,3]return = [1]

Requests 0, 1, and 2 use servers 0, 1, and 2. Server 1 finishes at time 4 and accepts request 3. Request 4 is dropped, so server 1 handles the most.

Example 2

k = 2arrival = [1,2,3]load = [1,1,1]return = [0]

Each earlier request is finished before the next arrives. Requests 0 and 2 use server 0, while request 1 uses server 1.

Constraints

  • 1 <= k <= 10000
  • 1 <= arrival.length <= 20000
  • load.length equals arrival.length.
  • Arrival times strictly increase, and 1 <= arrival[i] <= 1000000000.
  • 1 <= load[i] <= 1000000000

More Citadel Onsite Interview questions

  • Maximize Workday EarningsOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Minimum Changes for Palindromic BlocksOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Removal PoolONSITE INTERVIEW · Seen Sep 2026
  • Centered K-by-K Submatrix SumsONSITE INTERVIEW · Seen Aug 2026
  • Search Suggestions with a Prefix TreeONSITE INTERVIEW · Seen Aug 2026
  • Traverse Interior Matrix Cells in Row-Major OrderONSITE INTERVIEW · Seen Aug 2026
  • Time-Based Key-Value StorePHONE SCREEN · ONSITE INTERVIEW · Seen Feb 2026
  • 2048 Simulation and Board CodecONSITE INTERVIEW · Seen Jan 2026
  • Cancellable Priority Task QueueONSITE INTERVIEW · Seen Jan 2026
  • Dynamic Weighted SamplingONSITE INTERVIEW · Seen Jan 2026

Similar questions at other companies

  • Finish Time of Fixed-Length CPU TasksGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Design Authentication ManagerOracle · ONSITE INTERVIEWOracle interview questions
  • Delayed Job SchedulerWalmart Labs · ONSITE INTERVIEW
  • Parallel Workers with a Per-Phase BarrierMakeMyTrip.com · ONSITE INTERVIEWMakeMyTrip.com interview questions
  • Thread-Safe Task Storage and Worker DispatchNuro · ONSITE INTERVIEWNuro interview questions
  • Notification Deduplication WindowGoldman Sachs · ONSITE INTERVIEWGoldman Sachs interview questions
  • Implement a Min-Priority QueueAmazon · ONSITE INTERVIEW
  • Helpdesk Ticket ProcessingThe Walt Disney Company · ONSITE INTERVIEWThe Walt Disney Company interview questions
  • API Call Thread Pool ScheduleBaseten · ONSITE INTERVIEWBaseten interview questions
  • Execute Tasks by PrioritySnowflake · ONSITE INTERVIEWSnowflake interview questions

Interview reports that mention this question

  • Citadel SWE Intern Later Rounds and Superday: 13 Experiences

Citadel interview experiences

  • Citadel Securities Quant Researcher Intern Loop: 1 Experience
  • Citadel Securities Research Engineer Interview: 1 Experience
  • Citadel Securities SWE Intern First Round: 2 Experiences
  • Citadel Securities Experienced SWE Interviews: 1 Experience
  • Citadel SWE Intern First-Round Questions: 20 Experiences
All Citadel interview questionsSee Citadel hiring insights
Saved
class Solution {
    public List<Integer> busiestServers(int k, int[] arrival, int[] load) {
        // write your code here
    }
}
Checking account…