Professional Documents
Culture Documents
Q1) Which of the following schemes does quadratic probing come under? [1]
a) rehashing
b) open addressing
c) separate chaining
d)extended hashing
Q2) If we implement heap as maximum heap , adding a new node of value 15 . What
value will be at leaf nodes of the right subtree of the heap. [2]
a) 15 and 1
b) 25 and 1
c) 3 and 1
d) 2 and 3
Q3) In a min-heap, element with the smallest key is always in the which node? [1]
Q7 ) What is the hash function used in Double Hashing for probing sequence ? [1]
a) (h1(k) – i*h2(k))mod m
b) h1(k) + h2(k)
c) (h1(k) + i*h2(k))mod m
d) (h1(k) + h2(k))mod m
Q8) A hash table of length 10 uses open addressing with hash function [2]
h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table,
the table is as shown below.
Which one of the following choices gives a possible order in which the key values could
have been inserted in the table?
VARIENT 2
QUIZ 5
CS202
Q1) A hash table of length 10 uses open addressing with hash function [2]
h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table,
the table is as shown below.
Which one of the following choices gives a possible order in which the key values could
have been inserted in the table?
Q3) Which of the following schemes does quadratic probing come under? [1]
a) rehashing
b) extended hashing
c) separate chaining
d) open addressing
Q6) If we implement heap as min-heap, deleting root node (value 1)from the heap.
What would be the value of root node after second iteration if leaf node (value 100) is
chosen to replace the root at start. [2]
a) 2
b) 100
c) 17
d) 3
Q7 ) What is the hash function used in Double Hashing for probing sequence ? [1]
a) (h1(k) – i*h2(k))mod m
b) h1(k) + h2(k)
c) (h1(k) + i*h2(k))mod m
d) (h1(k) + h2(k))mod m
Q9) In a max-heap, element with the greatest key is always in the which node? [1]