My Calendar I, is a LeetCode problem. In this post we will see how we can solve this challenge in Python

Problem Description

Your class will be called like this:

MyCalendar cal = new MyCalendar();, end)

Example 1:

MyCalendar();, 20); // returns true, 25); // returns false, 30); // returns true Explanation: The first event can be booked. The second can't because time 15 is already booked by another event. The third event ....

You can find the full details of the problem My Calendar I at LeetCode

Solution: Please check the snippet for the solution.

This solution originally posted at: Github by @kamyu104