ProgrammingVery hard

A chained table has a load factor of 3. A successful search compares the key against nodes until it is found. What is the expected number of key comparisons for a successful search?

  1. A. 3
  2. B. 1.5
  3. C. 2.5
  4. D. 4

Correct answer: C. 2.5

The formula 1 + a / 2 gives 1 + 1.5 = 2.5 comparisons on average.

More C Programming questions

Exams that ask this topic