1845. Seat Reservation Manager ¶
- Time:
- Constructor: $O(1)$ (C++/Java) | $O(n\log n)$ (Python)
reserver()
: $O(\log n)$unreserve(seatNumber: int)
: $O(\log n)$
- Space:
- Constructor: $O(n)$
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
1 2 3 4 5 6 7 8 9 |
|