IBM interview question
Find the maximum number of processes or meetings active at the same time, endpoints inclusive
- Company:
- IBM
- Type:
- Coding
- Difficulty:
- Medium
- Reported:
- October 19, 2026
Problem
You are given a list of intervals [start, end], each describing when a process runs or a meeting takes place. Both endpoints are inclusive: an interval is active at every time t with start <= t <= end, so an interval that ends at time 10 and one that starts at time 10 overlap.
Return the maximum number of intervals that are active at the same time. The same task appears as a meeting-scheduling prompt, where the answer is the number of rooms needed, and as an analysis of process logs from a distributed service.
Example 1
Input: intervals = [[1, 4], [2, 5], [7, 9]]
Output: 2
[1, 4] and [2, 5] overlap during times 2 to 4; [7, 9] overlaps neither.
Example 2
Input: intervals = [[0, 30], [5, 10], [10, 20]]
Output: 3
At time 10 all three intervals are active, because the endpoints are inclusive.
Constraints
- Every interval has
start <= end; times are integers. - The list may be empty, in which case the answer is 0.
Reported by candidates or drawn from publicly available sources, and rewritten in our own words. Pathwise Prep does not publish confidential assessment content. Report a concern