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


Search array definition (Pascal version available)


typedef struct { ... typekey k; ... } datarecord, dataarray[]; typedef int boolean; int n; /*** Number of keys in hash table ***/ void insert( new, r ) typekey new; dataarray r; int search( key, r ) typekey key; dataarray r; /*** auxiliary functions ***/ boolean deleted( ri ) datarecord *ri; boolean empty( ri ) datarecord *ri; int hashfunction( key ) typekey key; int increment( key ) typekey key;

C source (33.def.c) Pascal source (33.def.p)



© Addison-Wesley Publishing Co. Inc.