MCQOPTIONS
Saved Bookmarks
This section includes 11 Mcqs, each offering curated multiple-choice questions to sharpen your Hash Tables Chaining with Binary Trees Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
In open addressing the hash table can never become full. |
| A. | True |
| B. | False |
| Answer» C. | |
| 2. |
Separate chaining is easier to implement as compared to open addressing. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 3. |
Which of the following technique stores data separately in case of a collision? |
| A. | Open addressing |
| B. | Double hashing |
| C. | Quadratic probing |
| D. | Chaining using a binary tree |
| Answer» E. | |
| 4. |
What is the disadvantage of BST over the hash table? |
| A. | BST is easier to implement |
| B. | BST can get the keys sorted by just performing inorder traversal |
| C. | BST can perform range query easily |
| D. | Time complexity of hash table in inserting, searching and deleting is less than that of BST |
| Answer» E. | |
| 5. |
What is the advantage of a hash table over BST? |
| A. | hash table has a better average time complexity for performing insert, delete and search operations |
| B. | hash table requires less space |
| C. | range query is easy with hash table |
| D. | easier to implement |
| Answer» B. hash table requires less space | |
| 6. |
What is the time complexity of the delete function in the hash table using a binary tree? |
| A. | O(1) |
| B. | O(n) |
| C. | O(log n) |
| D. | O(n log n) |
| Answer» B. O(n) | |
| 7. |
What is the time complexity of the search function in a hash table using a binary tree? |
| 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 insert function in a hash table using a binary tree? |
| A. | O(1) |
| B. | O(n) |
| C. | O(log n) |
| D. | O(n log n) |
| Answer» B. O(n) | |
| 9. |
What is the disadvantage of hashing with chaining? |
| A. | not easy to implement |
| B. | takes more space |
| C. | quite sensitive to hash function |
| D. | table gets filled up easily |
| Answer» C. quite sensitive to hash function | |
| 10. |
What is the advantage of hashing with chaining? |
| A. | cache performance is good |
| B. | uses less space |
| C. | less sensitive to hash function |
| D. | has a time complexity of O(n) in the worst case |
| Answer» D. has a time complexity of O(n) in the worst case | |
| 11. |
Which of the following variant of a hash table has the best cache performance? |
| A. | hash table using a linked list for separate chaining |
| B. | hash table using binary search tree for separate chaining |
| C. | hash table using open addressing |
| D. | hash table using a doubly linked list for separate chaining |
| Answer» D. hash table using a doubly linked list for separate chaining | |