#K71882. Minimum Meeting Rooms

    ID: 33630 Type: Default 1000ms 256MiB

Minimum Meeting Rooms

Minimum Meeting Rooms

You are given a list of meeting time intervals, each represented as a pair ( (start, end) ). The task is to determine the minimum number of meeting rooms required so that all the meetings can be scheduled without any conflicts. Meetings may overlap, and a single room cannot host more than one meeting at a time. Use efficient scheduling strategies to design an algorithm that computes the required number of rooms.

inputFormat

The input is read from standard input (stdin). The first line contains an integer ( N ) representing the number of meetings. Each of the following ( N ) lines contains two space-separated integers ( start ) and ( end ) which denote the start and end times of a meeting.

outputFormat

Output to standard output (stdout) a single integer representing the minimum number of meeting rooms required to accommodate all meetings.## sample

3
0 30
5 10
15 20
2

</p>