Hashing: GATE CS Previous Year Questions

Hashing · Data Structures

19 questions · asked in 14 of 27 years (2000–2026)

MCQ 13 · MSQ 2 · NAT 41-mark 10 · 2-mark 9

2000Questions per year2026

Questions 11–15 of 19

Q11GATE 2014 (Session 3)2 marksMCQ−0.67 if wrong
Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are unfilled after the first 3 insertions?

Q12GATE 20102 marksMCQ−0.67 if wrong
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below
0 1 2 42 3 23 4 34 5 52 6 46 7 33 8 9
How many different insertion sequences of the key values using the same hash function and linear probing will result in the hash table shown above?

Q13GATE 20102 marksMCQ−0.67 if wrong
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below
0 1 2 42 3 23 4 34 5 52 6 46 7 33 8 9
Which one of the following choices gives a possible order in which the key values could have been inserted in the table?

Q14GATE 20092 marksMCQ−0.67 if wrong
The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and linear probing. What is the resultant hash table?
(A) 0 1 2 2 3 23 4 5 15 6 7 8 18 9 (B) 0 1 2 12 3 13 4 5 5 6 7 8 18 9 (C) 0 1 2 12 3 13 4 2 5 3 6 23 7 5 8 18 9 15 (D) 0 1 2 12,2 3 13,3,23 4 5 5,15 6 7 8 18 9

Q15GATE 20082 marksMCQ−0.67 if wrong
Consider a hash table of size 11 that uses open addressing with linear probing. Let h(k)=kmod 11 be the hash function used. A sequence of records with keys
43 36 92 87 11 4 71 13 14
is inserted into an initially empty hash table, the bins of which are indexed from zero to ten. What is the index of the bin into which the last record is inserted?

Keep practising

Topics in Data Structures

All CS topics ›