Tap here to switch tabs
Problem
Submissions

Problem: Maximum Team Size with Overlapping Intervals

Maximum Team Size with Overlapping Intervals gives start and end time arrays for candidates. Return the largest team formed by one candidate and all others whose inclusive intervals overlap it.

Statement

You are given two 00 indexed integer arrays, startTime and endTime, both of length n, representing the active time intervals of n candidates. The ithi^{ {th}} candidate is active during the inclusive time range [[startTime[i], endTime[i]]].

A candidate can form a team consisting of themselves and any other candidates whose active intervals overlap with their own interval. Two intervals overlap if they share at least one common unit of time.

Return an integer denoting the maximum team size that can be formed by any candidate.

Constraints:

  • 1≤1 \leq n ==== startTime.length ==== endTime.length ≤105\leq 10^5

  • 0≤0 \leq startTime[i] ≤\leq endTime[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Team Size with Overlapping Intervals

Maximum Team Size with Overlapping Intervals gives start and end time arrays for candidates. Return the largest team formed by one candidate and all others whose inclusive intervals overlap it.

Statement

You are given two 00 indexed integer arrays, startTime and endTime, both of length n, representing the active time intervals of n candidates. The ithi^{ {th}} candidate is active during the inclusive time range [[startTime[i], endTime[i]]].

A candidate can form a team consisting of themselves and any other candidates whose active intervals overlap with their own interval. Two intervals overlap if they share at least one common unit of time.

Return an integer denoting the maximum team size that can be formed by any candidate.

Constraints:

  • 1≤1 \leq n ==== startTime.length ==== endTime.length ≤105\leq 10^5

  • 0≤0 \leq startTime[i] ≤\leq endTime[i] ≤109\leq 10^9