Direct chaining hashing: search
datarecord *search( key, ptrs ) typekey key; datarecord *ptrs[]; { int i, last; 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.