Discussion:
Hashes: Chaining vs Open Addressing
(too old to reply)
John Tan
2003-12-09 22:06:18 UTC
Permalink
Hi

I just wanted to know: if we are using open addressing, why do we have to
check if a key exists before inserting? The chaining method doesn't do
that, it just adds to the head (according to the notes on the course
website).

Thanks!
Jim Clarke
2003-12-09 23:02:09 UTC
Permalink
Post by John Tan
I just wanted to know: if we are using open addressing, why do we have to
check if a key exists before inserting? The chaining method doesn't do
that, it just adds to the head (according to the notes on the course
website).
That would vary by application, and I think you can assume that
an exam question would tell you that, or that you can make
reasonable assumptions.
--
Jim Clarke -- Dept. of Computer Science, University of Toronto
http://www.cs.utoronto.ca/~clarke

Loading...