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


P-tree retrieval of head of queue (Pascal version available)


typekey inspect( pq ) tree pq; { if ( pq == NULL ) Error /*** Inspecting an empty queue ***/; while ( pq->left != NULL ) pq = pq->left; return( pq->k ); };

C source (512.insp.c) Pascal source (512.insp.p)



© Addison-Wesley Publishing Co. Inc.