Open christopher-besch opened 3 years ago
I think it depends on the interpretation of "retrieved" -- if it includes taking out the node from the queue, it's logarithmic time for heap.
Maybe the fix should be in the chapter 4, something like: "Insertion and removal take O(logn) time, and finding the maximum takes O(1) time.
That makes sense; thanks for clearing that up for me.
I've implemented the suggested changes and replaced retrieve
with lookup
. What do you say?
Isn't the lookup time of the next node constant instead of logarithmic? Current version:
Referring to cppreference.com:
Referring to Page 43: