FOR i:
CARDINAL
IN [0 .. buckets)
DO
chainLength: INT ← 0;
cIndex: CARDINAL;
FOR p:
REF PRTEntry ← prt[i], p.chain
UNTIL p =
NIL
DO
chainLength ← chainLength + 1;
ENDLOOP;
items ← items + chainLength;
IF chainLength > longestChain THEN longestChain ← chainLength;
cIndex ← MIN [chainLength, 10];
chains[cIndex] ← chains[cIndex] + 1;
ENDLOOP;