Please use Laptop/Desktop or any other large screen for the Mock Interview Session.

Meeting rooms and Next greater element.



YouTube Video Thumbnail
Link

Watch above sample mock interview video to see how it works.
Login and Buy Premium to Start the Interview



Minimum Meeting Rooms Required

Minimum Meeting Rooms Required

Problem Statement

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.

Examples

Example 1:

Intervals: [[1, 25], [10, 15], [20, 30]]
Minimum Rooms: 3

Example 2:

Intervals: [[3, 7], [6, 9]]
Minimum Rooms: 2

Constraints

  • 1 ≤ number of meetings ≤ 10,000
  • 0 ≤ start time < end time ≤ 1,000,000