Triple booking prevention
Your task
A meeting-room scheduler accepts bookings as half-open intervals [start, end). A booking succeeds unless it would cause a TRIPLE booking, three events all overlapping at some instant. Given the bookings in arrival order, return a list of booleans indicating whether each booking was accepted. A rejected booking is not recorded and does not affect later bookings.
Examples
my_calendar_two(events: list[list[int]]) -> list[bool]Example 1
Input
my_calendar_two([[10, 20], [50, 60], [10, 40], [5, 15], [5, 10], [25, 55]])Output
[True, True, True, False, True, True]