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

Discussion

A collision in a symbol table hash occurs when

  • A.two different names hash to the same bucket
  • B.the same name is declared twice in one scope
  • C.the table becomes completely full of entries
  • D.a name is looked up before it has been declared

Answer: A

Distinct names sharing a bucket is unavoidable once the number of possible names exceeds the number of buckets. Chaining and open addressing are the two standard responses. The pigeonhole principle makes collisions unavoidable in any real table.

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

Post your comment

Please log in or register to post a comment.