Skip to main content
LeetCode 253, Medium. Topics: Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue). View on LeetCode. Generate this problem as a practice environment: tested reference solution, 20 parametrized pytest cases, and a playground notebook:

Problem

Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference rooms required.

Examples

Constraints

  • 1 <= intervals.length <= 10^4
  • 0 <= starti < endi <= 10^6
Note: Input types have been changed on April 15, 2019. Please reset to default code definition to get new method signature.

Solution

Reference implementation from solution.py on GitHub, full suite in test_solution.py:

Complexity

Tags

Grind, Blind 75, NeetCode 150, NeetCode 250, NeetCode All.
Last modified on August 25, 2026