Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Meeting Rooms III
Bookmark
Brute Force
Two Min-Heaps
Input
Standard
Three rooms
All delayed
LeetCode Example
Custom
n
=
2
,
meetings
=
[[0,10],[1,5],[2,7],[3,4]]
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
count:
0
0
roomEnd:
0
R0
0
R1
bestRoom: -
earliestEnd: -
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
count:
0
0
roomEnd:
0
R0
0
R1
bestRoom: -
earliestEnd: -
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
count:
0
0
roomEnd:
0
R0
0
R1
bestRoom: -
earliestEnd: -
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
count:
0
0
roomEnd:
0
R0
0
R1
bestRoom: 0
earliestEnd: 0
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
[0,10] R0
count:
1
0
roomEnd:
10
R0
0
R1
bestRoom: 0
earliestEnd: 0
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
[0,10] R0
count:
1
0
roomEnd:
10
R0
0
R1
bestRoom: 0
earliestEnd: 10
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
[0,10] R0
[1,5] R1
count:
1
1
roomEnd:
10
R0
5
R1
bestRoom: -
earliestEnd: ∞
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
[0,10] R0
[1,5] R1
count:
1
1
roomEnd:
10
R0
5
R1
bestRoom: 1
earliestEnd: 5
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
[0,10] R0
[1,5] R1
[2,7] R1 (delayed)
count:
1
2
roomEnd:
10
R0
10
R1
bestRoom: -
earliestEnd: ∞
0
1
2
3
4
5
6
7
8
9
10
Room 0
Room 1
[0,10] R0
[1,5] R1
[2,7] R1 (delayed)
count:
1
2
roomEnd:
10
R0
10
R1
bestRoom: 0
earliestEnd: 10
0
1
2
3
4
5
6
7
8
9
10
11
Room 0
Room 1
[0,10] R0
[3,4] R0 (delayed)
[1,5] R1
[2,7] R1 (delayed)
count:
2
2
roomEnd:
11
R0
10
R1
bestRoom: -
earliestEnd: -
algo
master
.
io
Step:
Find the room that held the most meetings
0 / 19
Input
Standard
Three rooms
All delayed
LeetCode Example
Custom
n
=
2
,
meetings
=
[[0,10],[1,5],[2,7],[3,4]]
0 / 19
algo
master
.
io
Step:
Find the room that held the most meetings