I don't think it can be constant time. Accessing a heap is O(log n), isn't it?
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't think it can be constant time. Accessing a heap is O(log n), isn't it?