Meeting Rooms II

Medium
ArrayIntervalsHeapSortingPremiumGoogleMeta
Given meeting intervals, print the minimum number of rooms required to hold all meetings. Input format: - First line: n - Next n lines: start end Intervals are half-open: a meeting ending at time t frees the room for a meeting starting at time t.

Constraints

0 <= n <= 10^5
-10^9 <= start <= end <= 10^9

Sample tests

Sample 1

Sample 2

Sign in to submit