This is great. Without knowing about predefined TreeMap, one would essentially have to implement the binary search tree with the reference to end time in each node, and also have to implement greaterThanOrEqualTo and lesserThanOrEqualTo (the floorKey and ceilingKey). That's a huge time savings! Do you think TreeMap is ubiquitous enough that it would generally be considered acceptable in an interview?
My Calendar I