再散列代码实现
HashTable Rehash(HashTable H)
{
int i,OldSize;
Cell *OldCells;
OldCells=H->TheCells;
OldSize=H->TableSize;
/*Get a new,empty table*/
H=InitializeTable(2*OldSize);
/*Scan through old table,reinserting into new*/
for(i=0;i<OldSize;i++)
if(OldCells[i].Info==Legitimate)
Insert(OldCells[i].Element,H);
free(OldCells);
return H;
}