ProgrammingHard

A chained table has 10 buckets holding 20 keys, and a successful search examines the matching key uniformly at random. What is the expected number of comparisons?

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

Correct answer: B. 2

With load a = 2, a successful search costs about 1 + a / 2 = 2 comparisons on average.

More C Programming questions

Exams that ask this topic