Курсовая работа: Хэш поиск
j:=HeshFunction(aKey);
aCount:=1;
Cur:= mas[j].GetHead.Getnext;
while (Cur<>nil) and (Cur.key<>aKey) do
begin
inc(aCount);
Cur:= Cur.next;
end;
if Cur=nil then
begin
result:='0';
Exit;
end else
begin
result:=Cur.key;
exit;
end;
end;
procedure TMas.DeleteAll;//удалениеконтейнера
var i:integer; Cur:TItem;
begin
for i:=1 to 10 do
begin
cur:=mas[i].Head.Getnext;
While Cur<>nil do
begin
mas[i].Head.next:=Cur.next;
Cur.Destroy;
cur:=mas[i].Head.next;