1
GATE CSE 2026 Set 1
MCQ (More than One Correct Answer)
+1
-0

Consider a hash table $P[0,1, \ldots, 10]$ that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function used is $h(x)=(x+7) \bmod 11$. Consider the following sequence of insertions performed on $P$ :

$$ 1,13,22,15,11,24 $$

Which of the following positions in the hash table is/are empty after these insertions are performed?

A

0

B

10

C

2

D

1

2
GATE CSE 2023
MCQ (Single Correct Answer)
+1
-0.33

An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let $$k$$ be the number of keys, $$m$$ be the number of slots in the hash table, and $$k > m$$. Which one of the following is the best hashing strategy to counteract the adversary?

A
Division method, i.e., use the hash function $$h(k)=k$$ mod $$m$$.
B
Multiplication method, i.e., use the has function $$h(k) = \left\lfloor {m(kA - \left\lfloor {kA} \right\rfloor )} \right\rfloor $$, where $$A$$ is a carefully chosen constant.
C
Universal hashing method.
D
If $$k$$ is a prime number, use Division method. Otherwise, use Multiplication method.
3
GATE CSE 2022
MCQ (Single Correct Answer)
+1
-0.33

Suppose we are given n keys, m has table slots, and two simple uniform hash functions h1 and h2. Further suppose our hashing scheme uses h1 for the odd keys and h2 for the even keys. What is the expected number of keys in a slot?

A
$${m \over n}$$
B
$${n \over m}$$
C
$${2n \over m}$$
D
$${n \over 2m}$$
4
GATE CSE 2020
Numerical
+1
-0
Consider a double hashing scheme in which the primary hash function is
h1(k)=k mod 23, and the secondary hash function is h2(k)=1+(k mod 19).
Assume that the table size is 23. Then the address returned by probe 1 in the probe sequence (assume that the probe sequence begins at probe 0) for key value k=90 is _______.
Your input ____

GATE CSE Subjects

Browse all chapters by subject

Software Engineering
Web Technologies