Leetcode 731. My Calendar II
Implement a booking system that accepts an interval only if adding it does not create any time point covered by three events, with book(start,end) returning true if the booking is allowed and false otherwise. The core challenge is efficiently detecting potential triple-overlaps (times up to 1e9, ≤1000 calls) by tracking existing bookings and their pairwise overlaps (or using a sweep-line/segment approach).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.