Problem
You get a list intervals of meetings. Each item [start, end] is one meeting from time start to time end.
A room can hold only one meeting at a time. A meeting can start in a room at the same time as the previous meeting in that room ends.
Return the smallest number of rooms that can hold all the meetings.
Example 1
- Input:
- intervals = [[1,6],[2,4],[4,9],[7,8]]
- Output:
- 2
- Explanation:
- Room 1 holds
[1, 6]and then[7, 8]. Room 2 holds[2, 4]and then[4, 9].
Example 2
- Input:
- intervals = [[3,5],[3,5],[3,5]]
- Output:
- 3
- Explanation:
- All three meetings happen at the same time, so each meeting needs its own room.
Example 3
- Input:
- intervals = [[10,12],[1,3]]
- Output:
- 1
Constraints
- 1 <= intervals.length <= 10^4
- intervals[i].length == 2
- 0 <= start < end <= 10^6
SysRound wrote this statement. A reference solution checks every example.
Related questions
Continue with questions that share topics or the same question type.
- Advantage Shuffle
Coding · Array · Greedy · Sorting
- Maximum Coins From K Consecutive Bags
Coding · Array · Binary Search · Greedy
- Maximum Number of Points From Grid Queries
Coding · Array · Breadth-First Search · Heap (Priority Queue)
- Minimum Cost to Hire K Workers
Coding · Array · Greedy · Heap (Priority Queue)
Sources · 2 references
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 10 records
Amazon
Leetcode 253. Meeting Rooms II
Reported Nov 10, 2026 · 6 source reports
JUNIOR, MID_LEVEL, SENIOR
Source snapshot: Nov 12, 2026
View sourceApple
Leetcode 253. Meeting Rooms II
Reported Aug 16, 2025 · 2 source reports
MID_LEVEL, SENIOR
Source snapshot: Nov 12, 2026
View sourceGoogle
Leetcode 253. Meeting Rooms II
Reported Oct 8, 2025 · 2 source reports
MID_LEVEL, SENIOR
Source snapshot: Nov 12, 2026
View sourceMeta
Leetcode 253. Meeting Rooms II
Reported Mar 10, 2025 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source