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


Unsorted list inspection


typekey inspect( pq ) list pq; {list p; typekey max; if (pq==NULL) Error /*** Empty Queue ***/; else {max = pq->k; for (p=pq->next; p!=NULL; p=p->next) if (max < p->k) max = p->k; return( max ); } };

C source (511b.insp.c)



© Addison-Wesley Publishing Co. Inc.