int search( key, r )
typekey key; dataarray r;
{ int i, inc, last;
i = hashfunction( key ) ;
inc = increment( key );
last = (i+(n-1)*inc) % m;
while ( i!=last && !empty(r[i]) && r[i].k!=key )
i = (i+inc) % m;
if (r[i].k==key) return( i );
else return( -1 );
}
|