MCQOPTIONS
Saved Bookmarks
This section includes 81 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.
| 51. |
In hash tables, how many traversal of links does a successful search require? |
| A. | 1+⅄ |
| B. | 1+⅄2 |
| C. | 1+ (⅄/2) |
| D. | ⅄3 |
| Answer» D. ⅄3 | |
| 52. |
In quadratic probing, if the table size is prime, a new element cannot be inserted if the table is half full. |
| A. | True |
| B. | False |
| Answer» C. | |
| 53. |
What is the formula used in quadratic probing? |
| A. | Hash key = key mod table size |
| B. | Hash key=(hash(x)+F(i)) mod table size |
| C. | Hash key=(hash(x)+F(i2)) mod table size |
| D. | H(x) = x mod 17 |
| Answer» D. H(x) = x mod 17 | |
| 54. |
Which of the following is the correct function definition for linear probing? |
| A. | F(i)= 1 |
| B. | F(i)=i |
| C. | F(i)=i2 |
| D. | F(i)=i+1 |
| Answer» C. F(i)=i2 | |
| 55. |
On what value does the probe sequence depend on? |
| A. | c1 |
| B. | k |
| C. | c2 |
| D. | m |
| Answer» C. c2 | |
| 56. |
What is the average retrieval time when n keys hash to the same slot? |
| A. | Theta(n) |
| B. | Theta(n2) |
| C. | Theta(nlog n) |
| D. | Big-Oh(n2) |
| Answer» B. Theta(n2) | |
| 57. |
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» C. h(k) = m/k | |
| 58. |
What is the running time of double hashing? |
| A. | Theta(m) |
| B. | Theta(m2) |
| C. | Theta(m log k) |
| D. | Theta(m3) |
| Answer» B. Theta(m2) | |
| 59. |
What is the load factor for an open addressing technique? |
| A. | 1 |
| B. | 0.5 |
| C. | 1.5 |
| D. | 0 |
| Answer» C. 1.5 | |
| 60. |
Which technique was firstly used clustering documents using the similarity of two words or strings? |
| A. | MinHash |
| B. | Stack |
| C. | Priority Queue |
| D. | PAT Tree |
| Answer» B. Stack | |
| 61. |
What is the hash function used in linear probing? |
| A. | H(x)= key mod table size |
| B. | H(x)= (key+ F(i2)) mod table size |
| C. | H(x)= (key+ F(i)) mod table size |
| D. | H(x)= X mod 17 |
| Answer» D. H(x)= X mod 17 | |
| 62. |
Which technique has the greatest number of probe sequences? |
| A. | Linear probing |
| B. | Quadratic probing |
| C. | Double hashing |
| D. | Closed hashing |
| Answer» D. Closed hashing | |
| 63. |
The task of generating alternative indices for a node is called? |
| A. | Collision handling |
| B. | Collision detection |
| C. | Collision recovery |
| D. | Closed hashing |
| Answer» B. Collision detection | |
| 64. |
Quadratic probing overcomes primary collision. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 65. |
Which scheme uses a randomization approach? |
| A. | hashing by division |
| B. | hashing by multiplication |
| C. | universal hashing |
| D. | open addressing |
| Answer» D. open addressing | |
| 66. |
Which among the following is the best technique to handle collision? |
| A. | Quadratic probing |
| B. | Linear probing |
| C. | Double hashing |
| D. | Separate chaining |
| Answer» B. Linear probing | |
| 67. |
Which of the following problems occur due to linear probing? |
| A. | Primary collision |
| B. | Secondary collision |
| C. | Separate chaining |
| D. | Extendible hashing |
| Answer» B. Secondary collision | |
| 68. |
Which of the following techniques offer better cache performance? |
| A. | Quadratic probing |
| B. | Linear probing |
| C. | Double hashing |
| D. | Rehashing |
| Answer» C. Double hashing | |
| 69. |
Which of the following is defined as the ratio of total elements of intersection and union of two sets? |
| A. | Rope Tree |
| B. | Jaccard Coefficient Index |
| C. | Tango Tree |
| D. | MinHash Coefficient |
| Answer» B. Jaccard Coefficient Index | |
| 70. |
What kind of deletion is implemented by hashing using open addressing? |
| A. | active deletion |
| B. | standard deletion |
| C. | lazy deletion |
| D. | no deletion |
| Answer» D. no deletion | |
| 71. |
What is the correct notation for a load factor? |
| A. | Ω |
| B. | ∞ |
| C. | ∑ |
| D. | ⅄ |
| Answer» E. | |
| 72. |
In simple chaining, what data structure is appropriate? |
| A. | Singly linked list |
| B. | Doubly linked list |
| C. | Circular linked list |
| D. | Binary trees |
| Answer» C. Circular linked list | |
| 73. |
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» C. 49 | |
| 74. |
IN_SIMPLE_CHAINING,_WHAT_DATA_STRUCTURE_IS_APPROPRIATE??$ |
| A. | Singly linked list |
| B. | Doubly linked list |
| C. | Circular linked list |
| D. | Binary trees |
| Answer» C. Circular linked list | |
| 75. |
In simple uniform hashing, what is the search complexity? |
| A. | O(n) |
| B. | O(logn) |
| C. | O(nlogn) |
| D. | O(1) |
| Answer» E. | |
| 76. |
What is simple uniform hashing? |
| A. | Every element has equal probability of hashing into any of the slots |
| B. | A weighted probabilistic method is used to hash elements into the slots |
| C. | All of the mentioned |
| D. | None of the mentioned |
| Answer» B. A weighted probabilistic method is used to hash elements into the slots | |
| 77. |
What is the load factor? |
| A. | Average array size |
| B. | Average key size |
| C. | Average chain length |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 78. |
What can be the techniques to avoid collision? |
| A. | Make the hash function appear random |
| B. | Use the chaining method |
| C. | Use uniform hashing |
| D. | All of the mentioned |
| Answer» E. | |
| 79. |
What is a hash function? |
| A. | A function has allocated memory to keys |
| B. | A function that computes the location of the key in the array |
| C. | A function that creates an array |
| D. | None of the mentioned |
| Answer» C. A function that creates an array | |
| 80. |
If several elements are competing for the same bucket in the hash table, what is it called? |
| A. | Diffusion |
| B. | Replication |
| C. | Collision |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 81. |
What is a hash table? |
| A. | A structure that maps values to keys |
| B. | A structure that maps keys to values |
| C. | A structure used for storage |
| D. | A structure used to implement stack and queue |
| Answer» C. A structure used for storage | |