[Home]
[Contents]
[Chapter]
[Previous Algorithm]
[Next Algorithm]


Heap deletion


delete( r ) RecordArray r; { extern int n; if ( n<1 ) error /*** extracting from an empty heap ***/; else { r[1]=r[n]; siftup( r, 1, --n ); } };

C source (513.del.c)



© Addison-Wesley Publishing Co. Inc.