Question
A gym studio's confirmed bookings are half-open time slots [start, end) in minutes, pairwise non-overlapping but stored in no particular order. A new request [start, end) arrives. Return True if the request clashes with any existing booking. Sharing only an endpoint — a class that ends exactly when another begins — is not a clash. Example: bookings [[60,120],[150,180]] with request [120,150] is False.
booking_conflicts(bookings: list[list[int]], request: list[int]) → bool[[[60,120],[150,180]],[120,150]]outfalseState 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.