Preparing your design workspace

Loading the problem and your saved attempt…

Design a Calendar Availability Scheduler

Model calendars, meetings with invited participants, recurring series, reminders, overlap rules, and shared availability.

For this exercise, assume a calendar scheduler used by people in one organization. An organizer creates a meeting with a start and end time and invites several participants.

Before the meeting is confirmed, the scheduler checks that every invited participant is free; if anyone is busy, the meeting is not created and the result names who is busy. A confirmed meeting counts as busy time for the organizer and every invitee.

A calendar can be marked exclusive, meaning it never holds two overlapping busy entries; a calendar that is not exclusive may hold overlapping entries. A meeting may repeat on a configurable frequency: daily, weekly, or monthly, every N periods, until an end date or for a set number of occurrences.

The organizer can update or cancel one occurrence, or update or cancel the whole series. For this exercise, assume a whole-series update changes the time, duration, invitees, or repeat rule for every occurrence that has not started yet, and is checked against everyone's availability like a new booking.

Each participant can add reminders, such as 10 minutes before the start, and the scheduler records when each reminder is due.

Also assume: times are half-open UTC intervals (a meeting ending at 10:00 does not overlap one starting at 10:00) with stable identities; each event is marked busy or transparent, and a transparent event stays on the calendar but never counts as busy time; updates and cancellations carry an expected version; timezone display, reminder delivery channels such as email or push, invitee accept or decline replies, and user interfaces are outside scope.

Design the classes, interfaces, relationships, state transitions, and important errors. Protect this invariant: stored intervals have start before end, and a change to a meeting or series is either fully applied or not applied at all.

Explain how the design reports an invalid interval, an invalid recurrence rule, a stale update, an unknown meeting, and an invitee who is not free.

Then implement a bounded in-memory version of the single-event core contracts in a language of your choice: createEvent, updateEvent, cancelEvent, and findCommonAvailability.

Include focused executable tests for a touching half-open boundary, transparent events, an exclusive overlap, a stale update, and one common-free-window query.

Invitations, recurrence expansion, and reminders are designed in the earlier checkpoints but stay out of the implementation checkpoint, as do persistence and user interfaces. A final follow-up maps the design to database tables and covers cancelling a series while one occurrence is being edited.