Machine-translated by Google. Questions are authored in English.
Top

Discussion

Separate chaining resolves collisions by

  • A.rejecting the second name that hashes to the bucket
  • B.keeping a list of entries hanging from each bucket
  • C.searching forward for the next unoccupied bucket
  • D.enlarging the table whenever a collision occurs

Answer: B

Each bucket holds a pointer to a list of the entries that hashed there. Lookup hashes once and then walks a short list, which stays cheap provided the load factor is kept modest. Unlike open addressing, chaining continues to work when the table is overfull.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.