ProgrammingHard

Chaining with head insertion: keys 10, 3 and 17 all hash to bucket 3 in a table of size 7. Which key is first in the chain after the three inserts?

  1. A. 10
  2. B. 3
  3. C. 17
  4. D. 7

Correct answer: C. 17

Each new node is placed at the front of its chain, so the last key inserted, 17, is first.

More C Programming questions

Exams that ask this topic