The GATE Grind

GATE Algorithms: Hashing – Previous Year Questions

4 GATE previous year questions on Hashing (Algorithms, Computer Science) with answers and explanations, from every paper.

4 questions worth 7 marks in all (1 1-mark, 3 2-mark). Asked between 2014 and 2025, so you can see how the topic has been tested over time.

  1. GATE 2014 CS (CS3) Q50 (2 marks, Multiple choice) – A 100-slot hash table resolves collisions by chaining. Under simple uniform hashing, find the probability that the first three slots remain empty…
  2. GATE 2014 CS (CS1) Q50 (2 marks, Multiple choice) – A 9-slot hash table uses h(k) = k mod 9 and chaining. Keys 5,28,19,15,20,33,12,17,10 are inserted in that order. Find maximum, minimum and average…
  3. GATE 2025 CS (CS1) Q65 (2 marks, Numerical answer) – In a double hashing scheme, h 1(k) = k 11 and h 2(k) = 1 + (k 7) are the auxiliary hash functions. The size m of the hash table is 11. The hash…
  4. GATE 2020 CS Q33 (1 mark, Numerical answer) – Consider a double hashing scheme in which the primary hash function is h 1(k)=k 23, and the secondary hash function is h 2(k)=1+(k 19). Assume that…