Sweep Line Algorithm Illustration

The Sweep Line Algorithm is a technique used to solve problems by simulating a line that sweeps across the plane. In this example, we'll use it to find active appointments at each time point.

We have the following appointments: (9, 10.5), (10, 11), (14, 15), (15.5, 16.5), where each pair represents (start time, end time).

9
10
11
12
13
14
15
16
17

Current Sweep Line Position: 9:00

Starting the sweep...
Active Appointments: None