ByteDance interview question
Check whether all meetings fit one room and find the minimum number of rooms
- Company:
- ByteDance
- Type:
- Coding
- Difficulty:
- Medium
- Reported:
- November 18, 2026
Problem
You are given a list of meeting time intervals [start, end]. A meeting occupies its room from start up to, but not including, end, so a meeting that ends at time t does not conflict with one that starts at t.
- Determine whether one person could attend all the meetings, that is, whether no two meetings overlap.
- Return the minimum number of meeting rooms required to hold all the meetings.
Example 1
Input: intervals = [[0, 30], [5, 10], [15, 20]]
Output: can_attend_all = False, min_meeting_rooms = 2
[0, 30] overlaps both other meetings, which do not overlap each other.
Example 2
Input: intervals = [[7, 10], [2, 4]]
Output: can_attend_all = True, min_meeting_rooms = 1
The meetings are disjoint.
Constraints
- Every meeting has
start < end, as in the standard version of this problem. - Other limits are not stated; ask the interviewer.
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