FastPrepMost Employees Working at Once
Problems/Most Employees Working at Once

Most Employees Working at Once

Citadel logoCitadel● MediumFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Citadel Securities online assessment, as the first of two coding problems in a 90-minute test. You get the start and end time of each employee and return the most employees who are working at the same moment.

The report gives no examples and no range for the times. It does not say whether someone who leaves at a time and someone who arrives at that same time count together. Here they do, which is the rule the report gives for the second problem of the same test. The examples are ours.

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

A company has n employees. Employee i starts work at time start[i] and finishes at time end[i]. The employee is working at every moment from start[i] to end[i], including both ends.

Return the largest number of employees who are working at the same moment.

Note: an employee who finishes at time t and an employee who starts at time t are both working at time t.

Function

maxEmployeesAtOnce(start: int[], end: int[]) → int

Examples

Example 1

start = [1,2,3,6]end = [4,3,7,8]return = 3

At time 3, employees 0, 1 and 2 are all working. Employee 1 finishes at 3 and employee 2 starts at 3, and both ends count. When employee 3 starts at 6, only employee 2 is still working, so no moment has more than 3 employees.

Example 2

start = [1,3,6]end = [3,6,9]return = 2

At time 3, employees 0 and 1 are both working. At time 6, employees 1 and 2 are. No moment has all three, because employee 0 finishes before employee 2 starts.

Example 3

start = [4]end = [4]return = 1

The only employee works at the single moment 4.

Constraints

  • start.length == end.length == n
  • 1 <= n <= 2 * 105
  • 0 <= start[i] <= end[i] <= 109

More Citadel Online Assessment questions

  • Speed Up a Slow FunctionOA · PHONE SCREEN · Seen Nov 2026
  • Possible MEX Values After One Optional IncrementOA · Seen Oct 2026
  • Busy IntersectionOA · Seen Sep 2026
  • Shortest Path in an Unweighted GraphOA · Seen Sep 2026
  • Maximize Workday EarningsOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Minimum Changes for Palindromic BlocksOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Minimum Image Processing CostOA · Seen Jul 2026
  • Coprime Pick with Change CostOA · Seen Jul 2026
  • Process SchedulingOA · Seen Mar 2026
  • Employee With the Most OverlapsOA · Seen Feb 2026

Similar questions at other companies

  • Minimum Machines for TasksExpedia · OAExpedia interview questions
  • Meeting Rooms IIUber · PHONE SCREENUber interview questions
  • Meeting Rooms IIAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Meeting Rooms IIWalmart · PHONE SCREENWalmart interview questions
  • Earliest Common Meeting SlotAdobe · PHONE SCREENAdobe interview questions
  • Intersect Multiple Interval ListsGoogle · ONSITE INTERVIEWGoogle interview questions
  • Merge IntervalsApple · OA · PHONE SCREEN · ONSITE INTERVIEWApple interview questions
  • Earliest Meeting Time for All EmployeesCapital One · OACapital One interview questions
  • Maximum Easy Tasks After RearrangingIBM · OAIBM interview questions
  • Maximum Interactive Team SizeMicrosoft · OAMicrosoft interview questions

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 Later Rounds and Superday: 13 Experiences
  • Citadel SWE Intern First-Round Questions: 20 Experiences
All Citadel interview questionsSee Citadel hiring insights
Saved
class Solution {
    public int maxEmployeesAtOnce(int[] start, int[] end) {
      // Write your code here.
    }
}
Checking account…