Meeting rooms and Next greater element.
You are given a list of intervals representing meeting times, where each interval includes a start time and an end time [[start1, end1], [start2, end2], ...]
with start_i < end_i
. Your task is to find the smallest number of meeting rooms needed so that all meetings can take place without overlapping in the same room.
Example 1:
Intervals: [[1, 25], [10, 15], [20, 30]] Minimum Rooms: 3
Example 2:
Intervals: [[3, 7], [6, 9]] Minimum Rooms: 2