ProgrammingVery hard

With linear probing at load factor 0.5, the expected number of probes for an unsuccessful search, under uniform hashing, is what?

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

Correct answer: D. 2.5

The standard formula is (1 + 1 / (1 - a)^2) / 2 with a = 0.5, giving (1 + 4) / 2 = 2.5. The successful-search formula gives 1.5.

More C Programming questions

Exams that ask this topic