PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs323] Hash table hint
Date: Thursday, 12 Nov 2020, 08:17:37


    > Message Posted By: Unknown
    >
    > The hint suggests using one large array to store all nodes and then using
    > header nodes to point into different points of the large array to start
    > chains, but how do we keep chains from colliding into each other then? If
    > we have a large array of 100 entries and 10 headers that point into places
    > dividing it up into 10 segments of 10, doesn't that limit our bucket size
    > to 10 before we have to redo the entire hash table?

If there were no array, each allocated hash node would
have a field that points to the next hash node in the
chain.  That does not change when you allocate an array
of hash nodes rather than allocate them one att a time.

--Stan-
PREV INDEX NEXT