Question

Design a calendar application where users can view and schedule meetings.

Background

This is quite an open-ended question, similar to the previous design question. However, this question does have a slightly more algorithmic and data structure-focused bend to it as we’ll see when we discuss the design. It’s important to be ready for these types of questions, particularly if you have a Computer Science or technical background.

Solution approach

We’ll follow the same approach as we did for the previous question:

  • Define system requirements

    Before we begin any design we’ll spend a few minutes agreeing on the one to two primary use cases we’ll need to cover.

  • System breakdown

    We’ll then diagram the key individual components of the system needed to address the one to two primary use cases.

  • Dataflow discussion

    We’ll discuss the necessary data points the system will need to collect and how they flow through the system.

  • Scaling the design

    We’ll talk about design choices and tradeoffs to ensure that the system scales.

  • Capacity modeling

    We’ll estimate the request volume and data volume the system will need to handle for a given time period.

Sample answer

System requirements

We’ll focus on two primary use cases for this system:

View calendar

When the user opens the application, they can see current calendar entries (i.e. booked meetings). For now, we will assume only a single time zone for simplicity. The user can page through to see future calendar entries.

Book meetings

The user should be able to book meetings on other users’ calendars. Conflicts should be detected. We will assume that meetings can be set at the minute boundary (i.e. the shortest meeting is one minute).

Note
We will assume for now that other supporting functions such as authentication will not be in scope for this exercise, although it may be a useful followup to think through how these other requirements may be implemented.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.