Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Meeting Rooms Minimum Count

EasyPython00:00
Practice interviewer
In session
5 left
00:00

Your question is Meeting Rooms Minimum Count. Start with the requirements on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Disney+ Hotstar teams schedule meetings throughout the day. Given a list of meeting intervals, determine the minimum number of rooms required so that no overlapping meetings share a room.

Each interval is represented as [start, end], where start and end are integer time values. A meeting ending at time t does not overlap with one starting at time t, so its room can be reused immediately. Return the maximum number of meetings occurring simultaneously.

Formal Specification

Implement min_meeting_rooms(intervals).

  • Input: A list of integer pairs, where intervals[i] = [start, end] and start < end.
  • Output: An integer representing the minimum number of rooms needed.

Constraints

  • 0 <= len(intervals) <= 10^5
  • 0 <= start < end <= 10^9
  • Each interval contains exactly two integers
  • Intervals may be provided in any order

Function Signature

def min_meeting_rooms(intervals):
Your solutionPython 3
You need to log in / sign up to run or submit.
Run your code to see test output