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 separate chaining. Which cells end up with chains?
Cell 1: 20. Cell 4: 16, 5. Cell 5: 44, 88, 11. Cell 6: 94, 39. Cell 7: 12, 23. Cell 9: 13. The other five cells stay empty.
| Key | 2i + 5 | mod 11 |
|---|---|---|
| 12 | 29 | 7 |
| 44 | 93 | 5 |
| 13 | 31 | 9 |
| 88 | 181 | 5 |
| 23 | 51 | 7 |
| 94 | 193 | 6 |
| 11 | 27 | 5 |
| 39 | 83 | 6 |
| 20 | 45 | 1 |
| 16 | 37 | 4 |
| 5 | 15 | 4 |
Each key is appended to the list of its cell, so chain order is insertion order. Eleven keys in eleven cells is α = 1, yet only six cells are used and the longest chain has three entries. Real hash functions on real keys are never perfectly even.
With chaining a collision never affects another cell. Compare the same keys under linear probing, where the collisions at 5, 6 and 7 push keys into every other cell.