← 返回 uber 的题目列表Meeting Rooms II
类型:online_judge
Meeting Rooms II
Given n meeting intervals intervals, where each interval is [start, end), return the minimum number of conference rooms required to hold all meetings.
If one meeting starts exactly when another ends, they may use the same room.
Input Format
First line: integer n
Next n lines: two integers, start end
Output Format
Print one integer: the minimum number of required rooms.
Constraints
0 <= n <= 10^5
0 <= start < end <= 10^9
Example
Input:
3
0 30
5 10
15 20
Output:
2
Example
Input
3
0 30
5 10
15 20
Output
2