Question

Suppose that we have k heaps, with at most n elements in each. We wish to combine these into a single heap. Each of the following sub-parts describes one approach to merging the heaps, and you are asked to derive the big O running time.

We create a new, empty linked list L. For each of the k heaps hi, we repeatedly remove the highest priority element and insert it onto