Mission Base

Program Base Library Functions

int pblHeapJoin

( PblHeap* heap, PblHeap* other )

Joins the two heaps by moving all elements of the 'other' heap.

Documentation

Joins the two heaps by moving all elements of the 'other' heap. When this function returns, 'other' will be empty.

This function has a time complexity of O(N), with N being the number of elements in the heap after the join.

Parameters:
heap - The heap to join to
other - The other heap to join
Returns:
int rc >= 0: The size of the heap after the join.
int rc < 0: An error, see pbl_errno:
PBL_ERROR_OUT_OF_MEMORY - Out of memory.

Alphabetic index



This page was generated with the help of DOC++.