My Calendar III - Python Solution @ LeetCode
My Calendar III, 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:
MyCalendarThree cal = new MyCalendarThree();
MyCalendarThree.book(start, end)
Example 1:
MyCalendarThree(); MyCalendarThree.book(10, 20); // returns 1 MyCalendarThree.book(50, 60); // returns 1 MyCalendarThree.book(10, 40); // returns 2 MyCalendarThree.book(5, 15); // returns 3 MyCalendarThree.book(5, 10); // returns 3 MyCalendarThree.book(25, 5 ....
You can find the full details of the problem My Calendar III at LeetCode
Solution: Please check the main.py snippet for the solution.
This solution originally posted at: Github by @kamyu104
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login .