Code Room
CodingMediumcod-g846
Subject IntervalsLevel Mid–Senior~30 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

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.

Implement
my_calendar_two(events: list[list[int]]) → list[bool]
Examples
in[[[10,20],[50,60],[10,40],[5,15],[5,10],[25,55]]]out[true,true,true,false,true,true]
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.