Meeting Rooms III
You are given an integer n. There are n rooms numbered from 0 to n - 1. You are given a 2D integer array meetings where meetings[i] = [starti, endi] means that a meeting will be held during the closed time interval [starti, endi]. All the values of starti are unique. Return the room number that held the most meetings.

30:00

Meeting Rooms III
hard
Topics
Companies

You are given an integer n. There are n rooms numbered from 0 to n - 1. You are given a 2D integer array meetings where meetings[i] = [starti, endi] means that a meeting will be held during the closed time interval [starti, endi]. All the values of starti are unique. Return the room number that held the most meetings.

Example 1:
Input: {"n":2,"meetings":[[0,10],[1,5],[2,7],[3,4]]}
Output: 0
Constraints:
  • 1n1001 \leq n \leq 100

  • 1meetings.length1051 \leq \text{meetings.length} \leq 10^5

  • meetings[i].length==2\text{meetings}[i].\text{length} == 2

  • 0starti<endi5×1050 \leq \text{start}_i < \text{end}_i \leq 5 \times 10^5

  • All start times starti\text{start}_i are unique.

Input
arr ={"n":2,"meetings":[[0,10],[1,5],[2,7],[3,4]]}

Start

Room 0

Room 1

Variables
No variables to display
DepthFunction Call
Stack empty
0/12