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


Search array definition


type datarecord = record ... k : typekey; ... end; dataarray = array [0..m-1] of datarecord; var n : integer; {*** Number of keys in hash table ***} procedure insert( new : typekey; var r : dataarray ); function search( key : typekey; var r : dataarray ) : -1 .. m-1; {*** auxiliary functions ***} function deleted( r[i] : datarecord ) : boolean; function empty( r[i] : datarecord ) : boolean; function hashfunction( key : typekey ) : 0 .. m-1; function increment( key : typekey ) : 1 .. m-1;

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



© Addison-Wesley Publishing Co. Inc.