Hello all!
I’m currently solving the task 15.19 and have a question:
why we use the BST for storing interval heights instead of Index Max-Heap?
I can assume that using max-heap will improve performance
as taking the max value will runs in O(1) in max-heap vs O(lgN) in BST (in case if BST is balanced),
insertion and deletion will take O(lgN) for both max-heap and balanced BST.
I would appreciate your comments.
Thanks!
Kind regards,
Elmira