Back to problems

My Calendar I

Algorithm · Uber · Medium

Create a calendar that records booked half-open intervals [start, end). A new booking may be accepted only when it overlaps with none of the bookings already stored. Return true if the event is added successfully; otherwise, return false. Examples Example 1: Constraints 0 <= start < end <= 10^9 No more than 1000 calls to book will be made. Company Notes This problem was reported as LeetCode 729 during a software engineer onsite interview. Coding onsite · Software Engineer ·…

Checking your access…