Meeting Rooms II
easy
1. You are given a 2D array containing the start and end times of various meetings [[s1, e1], [s2, e2] , ....]. 2. Obviously si < ei , i.e start time is less than end time for every meeting. 3. You have to find minimum number of rooms required to hold these meetings. 4. For example: Input: [[7,10],[2,4]] Output: 1 5. display is a utility function, feel free to use it for debugging purposes. 6. main takes input from the users. 7. This is a functional problem. 8. You have to complete the minMeetingRooms function. It takes as input a 2D array representing the meeting intervals. It should return the minimum number of rooms required. 9. Don't change the code of main and display.
Constraints
1 <= N <= 1000
Format
Input
First line takes input N, the number of meetings. Next N lines take input 2 space separated integers representing the start time and end time of a meeting. Input is handled for you.
Output
The minimum number of meeting rooms required. Output is handled for you.
Example
Sample Input
2
7 10
2 4
Sample Output
1