

MCQOPTIONS
Saved Bookmarks
This section includes 7 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the time complexity to delete an element from the direct address table? |
A. | O(n) |
B. | O(logn) |
C. | O(nlogn) |
D. | O(1) |
Answer» E. | |
2. |
How is a bit vector better compared to a normal array for implementing the hash table? |
A. | It saves time |
B. | It saves space |
C. | It saves both time and space |
D. | None of the mentioned |
Answer» C. It saves both time and space | |
3. |
What is the advantage of using a dynamic set in direct addressing? |
A. | It saves time |
B. | It saves space |
C. | It saves both time and space |
D. | None of the mentioned |
Answer» C. It saves both time and space | |
4. |
What is the time complexity to insert an element into the direct address table? |
A. | O(n) |
B. | O(logn) |
C. | O(nlogn) |
D. | O(1) |
Answer» E. | |
5. |
What is the search complexity in direct addressing? |
A. | O(n) |
B. | O(logn) |
C. | O(nlogn) |
D. | O(1) |
Answer» E. | |
6. |
When is it appropriate to use direct addressing? |
A. | When the array is comparatively large |
B. | When the universe U of keys is reasonably small |
C. | When the universe U of keys is reasonably large |
D. | When the array is comparatively small |
Answer» C. When the universe U of keys is reasonably large | |
7. |
What is direct addressing? |
A. | Distinct array position for every possible key |
B. | Fewer array positions than keys |
C. | Fewer keys than array positions |
D. | None of the mentioned |
Answer» B. Fewer array positions than keys | |