LOGBOOK

HELP

Quiz Entry - updated: 2026.12.01

Insert 12, 44, 13, 88, 23, 94, 11, 39, 20, 16, 5 into an 11-cell table with h(i) = (2i + 5) mod 11 and linear probing. What does the table look like?

Cells 0 to 10 hold 11, 39, 20, 5, 16, 44, 88, 12, 23, 13, 94: the table is completely full.

Home cells are 7, 5, 9, 5, 7, 6, 5, 6, 1, 4, 4 (as for chaining). Placing them in order:

Key Home Cells tried Placed at
12 7 7 7
44 5 5 5
13 9 9 9
88 5 5, 6 6
23 7 7, 8 8
94 6 6, 7, 8, 9, 10 10
11 5 5 … 10, 0 0
39 6 6 … 10, 0, 1 1
20 1 1, 2 2
16 4 4 4
5 4 4 … 10, 0, 1, 2, 3 3

The final key 5 needs eleven probes: it walks the whole table once before finding the last free cell. This is what α = 1 means for open addressing. One more put would find no cell at all, and a real implementation would have rehashed long before.

From Quiz: ADS / Sets, Maps and Hash Tables | Updated: Dec 01, 2026