You are given two integer arrays startTime and endTime of length n.
startTime[i] represents the start time of the ith employee.endTime[i] represents the end time of the ith employee.Two employees i and j can interact if their time intervals overlap. Two intervals are considered overlapping if they share at least one common time point.
A team is valid if there exists at least one employee in the team who can interact with every other member of the team.
Return an integer denoting the maximum possible size of such a team.
Example 1:
Input: startTime = [1,2,3], endTime = [4,5,6]
Output: 3
Explanation:
i = 0 with interval [1, 4].i = 1 having interval [2, 5] and i = 2 having interval [3, 6].Example 2:
Input: startTime = [2,5,8], endTime = [3,7,9]
Output: 1
Explanation:
i = 0, interval [2, 3] does not overlap with [5, 7] or [8, 9].i = 1, interval [5, 7] does not overlap with [2, 3] or [8, 9].i = 2, interval [8, 9] does not overlap with [2, 3] or [5, 7].Example 3:
Input: startTime = [3,4,6], endTime = [8,5,7]
Output: 3
Explanation:
i = 0 with interval [3, 8].i = 1 having interval [4, 5] and i = 2 having interval [6, 7].Constraints:
1 <= n == startTime.length == endTime.length <= 1050 <= startTime[i] <= endTime[i] <= 109Loading editor...
No test cases available.