← 返回 google 的题目列表Meeting Rooms (schedule conflict / minimum rooms)
类型:online_judge
Given n meeting time intervals intervals, where intervals[i] = [start_i, end_i).
Determine if a single person can attend all meetings (i.e., no overlaps).
Return the minimum number of conference rooms required to hold all meetings.
Input (assumed)
Line 1: integer n
Next n lines: start end
Output (assumed)
Line 1: true/false for whether all meetings can be attended
Line 2: an integer for the minimum rooms needed
Constraints
1 <= n <= 2*10^5
0 <= start < end <= 10^9
Example Input:
3
0 30
5 10
15 20
Output:
false
2
Example
Input
3
0 30
5 10
15 20
Output
false
2