Summary of Running Times
Common Operations | Effect | Unsorted Linked List | Self-balancing binary search tree | Binary heap | Binomial heap | Fibonacci heap | Brodal queue | Pairing heap |
---|---|---|---|---|---|---|---|---|
insert(data,key) | Adds data to the queue, tagged with key | O(1) | O(log n) | O(log n) | O(log n) | O(1) | O(1) | O(1) |
findMin -> key,data | Returns key,data corresponding to min-value key | O(n) | O(log n) or O(1) (**) | O(1) | O(log n) | O(1) | O(1) | O(1) |
deleteMin | Deletes data corresponding to min-value key | O(n) | O(log n) | O(log n) | O(log n) | O(log n)* | O(log n) | O(log n)* |
delete(node) | Deletes data corresponding to given key, given a pointer to the node being deleted | O(1) | O(log n) | O(log n) | O(log n) | O(log n)* | O(log n) | O(log n)* |
decreaseKey(node) | Decreases the key of a node, given a pointer to the node being modified | O(1) | O(log n) | O(log n) | O(log n) | O(1)* | O(1) | Unknown but bounded: * |
merge(heap1,heap2) -> heap3 | Merges two heaps into a third | O(1) | O(m log(n+m)) | O(m + n) | O(log n)*** | O(1) | O(1) | O(1) |
(*)Amortized time
(**)With trivial modification to store an additional pointer to the minimum element
(***)Where n is the size of the larger heap
Read more about this topic: Fibonacci Heap
Famous quotes containing the words summary, running and/or times:
“Product of a myriad various minds and contending tongues, compact of obscure and minute association, a language has its own abundant and often recondite laws, in the habitual and summary recognition of which scholarship consists.”
—Walter Pater (18391894)
“Would yoube good enough Alice panted out, after running a little further, to stop a minutejust to getones breath again?
Im good enough, the King said, only Im not strong enough. You see, a minute goes by so fearfully quick. You might as well try to stop a Bandersnatch!”
—Lewis Carroll [Charles Lutwidge Dodgson] (18321898)
“An actor must communicate his authors given messagecomedy, tragedy, serio- comedy; then comes his unique moment, as he is confronted by the looked-for, yet at times unexpected, reaction of the audience. This split second is his; he is in command of his medium; the effect vanishes into thin air; but that moment has a power all its own and, like power in any form, is stimulating and alluring.”
—Eleanor Robson Belmont (18781979)