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


Direct chaining hashing: insertion


void insert( key, ptrs ) typekey key; datarecord *ptrs[]; { extern int n; int i; i = hashfunction( key ); ptrs[i] = NewNode( key, ptrs[i] ); n++; }

C source (3310.ins.c)



© Addison-Wesley Publishing Co. Inc.