FastPrepMeeting Rooms II
Problems/Meeting Rooms II

Meeting Rooms II

Maven Clinic logoMaven Clinic● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A Maven Clinic MLE phone screen report describes a meeting-room question that asks for the most meetings at the same time. It says a sweep line was the intended solution. Our version uses the usual rule that an interval includes its start but not its end. It is about 92% the same as the reported question.

You are given meeting time intervals where each row [start, end] uses a half-open interval: a meeting occupies a room from start up to, but not including, end.

Return the minimum number of meeting rooms required so that every meeting can take place. A room whose meeting ends at time t may be reused by another meeting that starts at time t.

Function

minMeetingRooms(intervals: int[][]) → int

Examples

Example 1

intervals = [[0,30],[5,10],[15,20]]return = 2

The meeting [0,30] overlaps both shorter meetings, but the two shorter meetings do not overlap each other.

Example 2

intervals = [[7,10],[2,4]]return = 1

The meetings are disjoint, so one room can host both.

Example 3

intervals = [[1,5],[5,9],[5,6]]return = 2

The room used by [1,5] is available at time 5, while the two meetings beginning at 5 need two rooms together.

Constraints

  • 0 <= intervals.length <= 100000.
  • Each interval has exactly two integers [start, end].
  • 0 <= start < end <= 10^9.

More Maven Clinic interview questions

  • Minimum Appointment Cancellations with a Required BreakPHONE SCREEN · Seen Jun 2026
  • Shortest Currency Conversion with Three-Decimal RatePHONE SCREEN · Seen Mar 2026
  • Configurable Valid BracketsPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2025
  • Possible BipartitionPHONE SCREEN · Seen Aug 2024
  • Paginate Provider Listings with Per-Page DiversityONSITE INTERVIEW · Seen Apr 2026
  • Longest Valid ParenthesesONSITE INTERVIEW · Seen Aug 2025

Similar questions at other companies

  • Mutual-Friend RecommendationsMeta · PHONE SCREEN · ONSITE INTERVIEWMeta interview questions
  • Top K Frequent ElementsAmazon · OA · PHONE SCREEN
  • Tennis Court SchedulingAtlassian · PHONE SCREEN · ONSITE INTERVIEWAtlassian interview questions
  • Maximum Number of Events That Can Be AttendedByteDance · PHONE SCREENByteDance interview questions
  • Meeting Rooms IIeBay · PHONE SCREENeBay interview questions
  • Select the Top User MatchesDuolingo · PHONE SCREENDuolingo interview questions
  • Meeting Rooms IIQuince · PHONE SCREENQuince interview questions
  • Kth Largest Element in an ArrayLinkedIn · PHONE SCREENLinkedIn interview questions
  • Meeting Rooms IISecuronix · PHONE SCREEN
  • Merge Multiple Sorted StreamsNVIDIA · PHONE SCREENNVIDIA interview questions
All Maven Clinic interview questionsSee Maven Clinic hiring insights
Saved
class Solution {
    public int minMeetingRooms(int[][] intervals) {
        // Write your code here.
    }

}
Checking account…