GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 22

GATE CSE 2015 Set 3 Q22

Data Structures · Hashing · Full GATE CSE 2015 Set 3 paper

GATE 2015 Set 3, Q22 1 mark · NAT
Report issue

Hashing

Question 22, GATE 2015: A hash table T has 25 slots and stores 2000 elements. Find its load factor α.
Tap to enlarge
Answer & solution

Official answer: 80

1. Load factor measures the average number of elements per table slot, rather than the fraction of slots that are nonempty. With separate chaining, several elements may share a slot, so a load factor greater than one is meaningful.

2. Load factor is number of stored elements divided by number of slots: 2000/25=80. This is possible with chaining rather than a one-element-per-slot open-addressed table.

Original paper, page 60 · Answer key