2
$\begingroup$

I am trying to understand the HashTable open-addressing technique. I see there are three approaches: linear, quadratic and double hashing. I'm wondering are these techniques used:

  • to find an index of the main array and no bucketing is involved
  • or used when our buckets are arrays too and we are trying to add it to the bucket and we are not sure where to add.

Thanks in advance.

$\endgroup$

1 Answer 1

2
$\begingroup$

Open addressing is a method for handling collisions. Another method is chaining, in which we have lists at our table indices, like you say.

In other words, open addressing means that all elements are stored inside a single table. In particular, to resolve a collision, the probing sequence finds a free slot in our table.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.