MCQOPTIONS
Saved Bookmarks
This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your Hash Tables Chaining with List Heads Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following is an advantage of open addressing over separate chaining? |
| A. | it is simpler to implement |
| B. | table never gets full |
| C. | it is less sensitive to hash function |
| D. | it has better cache performance |
| Answer» B. table never gets full | |
| 2. |
By implementing separate chaining using list head we can reduce the number of collisions drastically. |
| A. | True |
| B. | False |
| Answer» C. | |
| 3. |
Which of the following technique is used for handling collisions in a hash table? |
| A. | Open addressing |
| B. | Hashing |
| C. | Searching |
| D. | Hash function |
| Answer» B. Hashing | |
| 4. |
What is the worst case time complexity of insert function in the hash table when the list head is used for chaining? |
| A. | O(1) |
| B. | O(n log n) |
| C. | O(log n) |
| D. | O(n) |
| Answer» E. | |
| 5. |
What is the advantage of using linked list over the doubly linked list for chaining? |
| A. | it takes less memory |
| B. | it causes more collisions |
| C. | it makes the process of insertion and deletion faster |
| D. | it causes less collisions |
| Answer» B. it causes more collisions | |
| 6. |
A hash table may become full in the case when we use open addressing. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 7. |
What is the time complexity of delete function in the hash table using list head? |
| A. | O(1) |
| B. | O(n) |
| C. | O(log n) |
| D. | O(n log n) |
| Answer» B. O(n) | |
| 8. |
What is the time complexity of search function in a hash table using list head? |
| A. | O(1) |
| B. | O(n) |
| C. | O(log n) |
| D. | O(n log n) |
| Answer» B. O(n) | |
| 9. |
What is the time complexity of insert function in a hash table using list head? |
| A. | O(1) |
| B. | O(n) |
| C. | O(log n) |
| D. | O(n log n) |
| Answer» B. O(n) | |
| 10. |
Which of the following trait of a hash function is most desirable? |
| A. | it should cause less collisions |
| B. | it should cause more collisions |
| C. | it should occupy less space |
| D. | it should be easy to implement |
| Answer» B. it should cause more collisions | |
| 11. |
What is the advantage of the hash table over a linked list? |
| A. | faster access of data |
| B. | easy to implement |
| C. | very efficient for less number of entries |
| D. | exhibit good locality of reference |
| Answer» B. easy to implement | |
| 12. |
Which of the following helps keys to be mapped into addresses? |
| A. | hash function |
| B. | separate chaining |
| C. | open addressing |
| D. | chaining using a linked list |
| Answer» B. separate chaining | |