Content deleted Content added
m fixed misspelling |
|||
Line 57:
Every leaf stores a pointer to one of the input arrays.
Every node stores a value and an index.
For the
For every internal leaf the value is the minimum of the values of the node's children.
The index of an internal leaf indicates which input array the value comes from.
Line 64:
It then updates the values of the nodes on the path from the corresponding leaf to the root.
As the tree is balanced, this path contains only Θ(log k) elements.
As there are n elements that need to be extracted, the resulting total running time is Θ(n log k).
===== Example =====
|