ProgrammingModerate

A chained hash bucket holds the nodes 30, 20, 10 in that order from the head. The node holding 20 is deleted and freed. How many nodes remain in the chain?

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

Correct answer: B. 2

Deleting one node from a chain of three leaves two. The removal of a middle node needs the predecessor's next pointer updated.

More C Programming questions

Exams that ask this topic