← 返回 citadel 的题目列表Find the Largest Team with a Core Employee
类型:online_judge
Given n employees' working hours intervals [startTime[i], endTime[i]], you need to form a team with at least one 'core employee' whose working hours overlap with those of all other team members. Find the maximum number of employees that such a team can contain. Implement a function with two integer arrays, startTime and endTime, as inputs and return the maximum size of the team that can be formed. The time complexity should be better than O(n^2).
Example:
Input: startTime = [2, 5, 6, 8], endTime = [5, 6, 10, 9]
Output: 3
Example
Input
startTime = [2, 5, 6, 8]
endTime = [5, 6, 10, 9]