Practice · 2 of 5
One Room, Many Meetings
CHALLENGE
Difficulty: intermediate+25 XP
**Description:** n meetings with start and end times occupy one room.
A meeting can start exactly when another ends. Maximize the number of
meetings scheduled; print that count.
**Input:** Line 1: n (1 ≤ n ≤ 10^5). Each line: s e (0 ≤ s < e ≤ 10^9).
**Output:** One integer — the maximum number of non-overlapping meetings.
**Example:** 3 / (1 4) (2 3) (3 5) → 2 — pick (2 3) and (3 5).
Press Submit to check your solution.
Back to lesson: Practice: Greedy Set