FastPrepMeeting Rooms II
Problems/Meeting Rooms II

Meeting Rooms II

The Walt Disney Company logoThe Walt Disney Company● EasyFULLTIMEOAONSITE INTERVIEW
QuestionFunctionExamplesConstraints

Problem statement

Source note: The report lists LC253, Meeting Rooms II, among collected past questions.

The report does not give bounds or the rule for equal endpoints. Here, intervals have positive duration, an ending room can be reused at the same time, and there are at most 500 meetings.

The judged task matches the report at about 85%.

Each pair [start,end] is a meeting that occupies one room during the half-open interval [start,end). Return the fewest rooms needed for all meetings.

A room can be reused when one meeting ends at exactly the next meeting's start time. The meetings may be given in any order. Return zero for an empty input.

Function

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

Examples

Example 1

intervals = [[0,10],[5,8],[8,12]]return = 2

The first and second meetings need two rooms at time five. At time eight, the second meeting ends and its room can be reused for the third. Two rooms suffice.

Example 2

intervals = [[1,2],[2,3]]return = 1

The first meeting ends when the second starts, so both can use one room.

Constraints

  • 0 <= intervals.length <= 500
  • Every interval has exactly two entries.
  • -1000000 <= intervals[i][j] <= 1000000
  • Each interval satisfies start < end.

More The Walt Disney Company problems

  • Find All Paths for a Name in a File SystemPHONE SCREEN · Seen Nov 2026
  • Resizable Array-Backed Integer SetPHONE SCREEN · Seen Sep 2026
  • Shortest Path with Directional Move CostsPHONE SCREEN · Seen Sep 2026
All The Walt Disney Company interview questionsSee The Walt Disney Company hiring insights
Saved
class Solution {
    public int minMeetingRooms(int[][] intervals) {
        // Write your code here
    }
}
Checking account…