You are very busy every day, so you want to implement a calendar program to help to manage all of your meetings. Any guests can book your time in the calendar, but your time should not be double booked, because you can't join two meetings at the same time.
In order to make this question easier to implement, let's use integer to represent the time on your calendar. You will receive a pair of two integers start_time and end_time, the range of the booking time x should be start_time <= x < end_time. Return true if the time slot is bookable (no double booked) and book the time slot, return false if anytime in the time slot is already booked.
Example:
book(20, 25) => true
book(15, 25) => false, because [20, 25) is booked
book(10, 20) => true
book(11, 12) => false, because [10, 20) is booked
book(30, 40) => true