ProgrammingModerate

A chained hash table is searched for a key that is absent. The chain at its bucket has 4 nodes. How many key comparisons are made?

  1. A. 3
  2. B. 5
  3. C. 4
  4. D. 1

Correct answer: C. 4

An unsuccessful search compares the key against every node in the chain, which here is four.

More C Programming questions

Exams that ask this topic