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


Direct chaining hashing: search


datarecord *search( key, ptrs ) typekey key; datarecord *ptrs[]; { int i; datarecord *p; p = ptrs[ hashfunction( key ) ]; while ( p!=NULL && key!=p->k ) p = p->next; return( p ); }

C source (3310.srch.c)



© Addison-Wesley Publishing Co. Inc.