GoLang Solution For LeetCode Problem: My Calendar I
Solving My Calendar I in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Your class will be called like this:
MyCalendar cal = new MyCalendar();
MyCalendar(); MyCalendar.book(10, 20); // returns true MyCalendar.book(15, 25); // returns false MyCalendar.book(20, 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 can be booked, as the first event takes every time less than 20, but not including 20.
See the full details of the problem My Calendar I at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go