Back to problems

Meeting Scheduler — Earliest Available Slot

Object-Oriented Programming · LinkedIn · Medium

Requirements Implement a scheduler with the following interface: The scheduler stores bookings as time intervals. find_earliest_slot(after, duration) must return the earliest time at which a booking of the requested length can begin, subject to the existing bookings. The meaning of after is intentionally worth clarifying: determine whether it includes after itself (>=) or must begin strictly later (>), and confirm that interpretation with the interviewer. Discuss the…

Checking your access…