Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Meeting Rooms II Overlap Maximum
00:00
5 left

Meeting Rooms II Overlap Maximum

MediumPython

Problem

Given a list of start and end times, how would you find the maximum number of meetings that overlap at one time?

Represent each meeting as [start, end] and treat intervals as half-open, so a meeting ending at time t does not overlap one starting at t. Implement max_overlapping_meetings(meetings) to return the maximum simultaneous meeting count.

Constraints

  • 0 <= meetings.length <= 1000
  • Each meeting is a pair [start, end]
  • 0 <= start <= end <= 10^9
  • Intervals are half-open: [start, end)

Function Signature

def max_overlapping_meetings(meetings):
Interviewer

Your question is Meeting Rooms II Overlap Maximum. Start with the requirements in the Question tab.

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.
CodePython 3
You need to log in / sign up to run or submit.Ln 2
Run your code to see test output here.