Applied AI Engineer (LLM) coding learning path Level 3 This level · 25 of 27

Meeting Rooms II

Medium Greedy Two pointers Sorting

Problem

Given meeting time intervals, return the minimum number of conference rooms required so that no two overlapping meetings share a room.

Original: LeetCode 253: Meeting Rooms II.

Examples

Example 1

Input`intervals = [[0, 30], [5, 10], [15, 20]]`
Output`2`

Example 2

Input`intervals = [[7, 10], [2, 4]]`
Output`1`

Constraints

  • intervals[i] = [start, end] with start < end
  • LeetCode 253 is a premium problem, so the full official bounds are not reproduced here.

Hints

Solution

Tried it yourself? The approach, complexity, and code stay hidden until you choose.

Sources (1)
  1. LeetCode 253: Meeting Rooms IIleetcode.com
Previous
Next