ProgrammingVery hard

A hash table starts with capacity 8 and doubles whenever the count exceeds half the capacity. After 9 insertions, what is the capacity?

  1. A. 16
  2. B. 8
  3. C. 64
  4. D. 32

Correct answer: D. 32

The table doubles to 16 when the 5th key arrives and to 32 when the 9th key arrives, so the capacity is 32.

More C Programming questions

Exams that ask this topic