Back to problems

Largest Team Whose Members Share a Common Office Window

Algorithm · Citadel · Medium

Requirements You receive two integer arrays, startTime and endTime, each containing n entries. Employee i is available during the closed interval [startTime[i], endTime[i]]. Determine the greatest possible team size under this condition: The selected group must include at least one designated "core" employee whose availability interval intersects the interval of every other chosen employee. The time limit is strict enough that an O(n^2) approach will fail the hidden cases.…

Checking your access…