Sponsored
Use these hints if you're stuck. Try solving on your own first.
Sort times by arrival time.
for each arrival_i find the smallest unoccupied chair and mark it as occupied until leaving_i.
Solve with full IDE support and test cases