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


Sequential search in lists (non-repeated keys)


datarecord *search( key, list ) typekey key; datarecord *list; { datarecord *p; for ( p=list; p != NULL && key != p->k; p = p->next ); return( p ); }

C source (311c.srch.c)



© Addison-Wesley Publishing Co. Inc.