Name
pqueue_destroy
Synopsis
void pqueue_destroy(PQueue *pqueue
);
Return Value
None.
Description
Destroys the priority queue specified by
pqueue
. No other operations are
permitted after calling pqueue_destroy unless
pqueue_init is called again. The
pqueue_destroy operation extracts all
elements from a priority queue and calls the function passed as
destroy
to
pqueue_init once for each element as it is
extracted, provided destroy
was not set
to NULL.
Complexity
O (n), where n is the number of elements in the priority queue.
Get Mastering Algorithms with C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.