Wish 电面题目求解答

类似meeting room 其实之前其他家的面经有看到过 面试的时候没想出来
Implement a function book(start,end) which returns True if a room is available and can be reserved and returns False if the room is already booked.

Test Cases -
book(1,10) -> True
book(20,30) -> True
book(25,40) -> False
book(35,50) -> True
book(49,60) -> False
book(0,1) -> True

我用了一个暴力解法 对面显然很不高兴
面试官说可以使用priority queue,但我不会,估计挂了,想问一下这道题怎么用