Vidyalelo
Data Structure · all questions

Hashing
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

175

Questions

1/9

Page

Pick an option on a question to see the right answer and solution.

What is the primary purpose of hashing in data structures?

Select an option to see the answer and solution.

In hashing, what is a "collision"?

Select an option to see the answer and solution.

Which of the following is a common method to handle collisions in hashing?

Select an option to see the answer and solution.

What is a hash function primarily used for in hashing?

Select an option to see the answer and solution.

Which collision resolution technique involves using a secondary hash function?

Select an option to see the answer and solution.

What is the time complexity of searching for an element in a well-distributed hash table using chaining?

Select an option to see the answer and solution.

What does "load factor" represent in hashing?

Select an option to see the answer and solution.

Which of the following is NOT a typical property of a good hash function?

Select an option to see the answer and solution.

What is the primary advantage of open addressing over chaining in hash tables?

Select an option to see the answer and solution.

In a hash table with linear probing, what happens if the desired slot is occupied?

Select an option to see the answer and solution.

What is "rehashing" in the context of hash tables?

Select an option to see the answer and solution.

What type of hash table collision resolution involves storing a list of all elements that hash to the same index?

Select an option to see the answer and solution.

Which of the following hash functions provides the best performance for a hash table?

Select an option to see the answer and solution.

How can you improve the performance of a hash table?

Select an option to see the answer and solution.

What is the main drawback of using linear probing in hash tables?

Select an option to see the answer and solution.

Which of the following is a disadvantage of using chaining for collision resolution in hash tables?

Select an option to see the answer and solution.

What is the main goal of a good hash function?

Select an option to see the answer and solution.

How is a hash table implemented in the case of open addressing?

Select an option to see the answer and solution.

Which probing technique uses a quadratic function to resolve collisions?

Select an option to see the answer and solution.

What happens if a hash function returns an index that is already occupied in a hash table using open addressing?

Select an option to see the answer and solution.