On 10/19/2012 11:03 AM, BartC wrote:
>
>
> "Willem" <> wrote in message
> news:...
>>[...]
>> Each hash bucket is a linked list. That's a very common type of hash
>> table.
>> In some respects, it is the easiest type.
>
> OK, but I still think it's more complex than needed, despite your saying
> it is easier.
The O.P.'s implementation was more complex than needed,
certainly. But for RAM-resident hash tables I think linked
lists are about the simplest implementation one can imagine.
(It's the first collision resolution technique described by
Knuth, who calls it "perhaps the most obvious" way and further
describes it as "a straightforward combination" of elementary
techniques.)
Linked lists are certainly simpler than open probing with
double hashing!
--
Eric Sosman
d