50+ Hashing Functions MCQs with FREE PDF

We have the best collection of Hashing Functions MCQs and answer with FREE PDF. These Hashing Functions MCQs will help you to prepare for any competitive exams like: BCA, MCA, GATE, GRE, IES, PSC, UGC NET, DOEACC Exams at all levels – you just have to practice regularly.

Hashing Functions MCQs

1. What is the hash function used in the division method?

a) h(k) = k/m

b) h(k) = k mod m

c) h(k) = m/k

d) h(k) = m mod k

Answer: h(k) = k mod m

2. What can be the value of m in the division method?

a) Any prime number

b) Any even number

c) 2p – 1

d) 2p

Answer: Any prime number

3. Which scheme provides good performance?

a) open addressing

b) universal hashing

c) hashing by division

d) hashing by multiplication

Answer: universal hashing

4. Using division method, in a given hash table of size 157, the key of value 172 be placed at position

a) 19

b) 72

c) 15

d) 17

Answer: 15

5. How many steps are involved in creating a hash function using a multiplication method?

a) 1

b) 4

c) 3

d) 2

Answer: 2

6. What is the hash function used in multiplication method?

a) h(k) = floor( m(kA mod 1))

b) h(k) = ceil( m(kA mod 1))

c) h(k) = floor(kA mod m)

d) h(k) = ceil( kA mod m)

Answer: h(k) = floor( m(kA mod 1))

7. What is the advantage of the multiplication method?

a) only 2 steps are involved

b) using constant

c) value of m not critical

d) simple multiplication

Answer: value of m not critical

8. What is the table size when the value of p is 7 in multiplication method of creating hash functions?

a) 14

b) 128

c) 49

d) 127

Answer: 128

9. What is the value of h(k) for the key 123456?

Given: p=14, s=2654435769, w=32

a) 123

b) 456

c) 70

d) 67

Answer: 67

10. Which scheme uses a randomization approach?

a) hashing by division

b) hashing by multiplication

c) universal hashing

d) open addressing

Answer: universal hashing

Hashing Functions MCQs PDF Download

50+ Hash Tables Chaining using Linked Lists MCQs PDF Download
50+ Hash Tables Chaining using Doubly Linked Lists MCQs PDF Download
50+ Hash Tables Chaining with Binary Trees MCQs PDF Download
50+ Hash Tables Chaining with List Heads MCQs PDF Download
50+ Hash Tables with Linear Probing MCQs PDF Download
50+ Hash Tables with Quadratic Probing MCQs PDF Download
50+ Double Hashing MCQs PDF Download
50+ Hash Tree MCQs PDF Download
50+ Min Hash MCQs PDF Download
50+ Direct Addressing Tables MCQs PDF Download


Categories: Hash Tables

%d bloggers like this: