Q = mergePQ(Q,R)
The output of the function is the priority queue whose elements are the disjoint union of the elements of Q and R. Note that Q is altered in the process to become the merged queue.
|
|
|
|
|
The priority queue Q is mutable and is altered by mergePQ. The elements of Q and R must be comparable to each other.
The object mergePQ is a method function.