InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
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)I'm obligated to ask this question of Hash Tables in division Hash Tables of Data Structures & Algorithms IThe question was posed to me during a job interview. |
|
Answer» Correct ANSWER is (a) O(1) |
|
| 52. |
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)My question comes from Hash Tables topic in section Hash Tables of Data Structures & Algorithms IThis question was posed to me in final exam. |
|
Answer» Correct CHOICE is (a) O(1) |
|
| 53. |
A hash table may become full in the case when we use open addressing.(a) true(b) falseI'd like to ask this question from Hash Tables in chapter Hash Tables of Data Structures & Algorithms IThe question was posed to me in semester exam. |
|
Answer» CORRECT CHOICE is (a) true The EXPLANATION is: A hash table may become full in the case when we use OPEN ADDRESSING. But when we use separate chaining it does not happen. |
|
| 54. |
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 collisionsThe query is from Hash Tables topic in division Hash Tables of Data Structures & Algorithms IThe question was posed to me in homework. |
|
Answer» The correct choice is (a) it takes less memory |
|
| 55. |
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)I want to ask this question from Hash Tables topic in section Hash Tables of Data Structures & Algorithms II had been asked this question in quiz. |
|
Answer» CORRECT option is (d) O(n) The best I can EXPLAIN: Worst case time complexity of insert function in the hash table when the list HEAD is used for chaining is O(n). It is caused when a number of COLLISIONS are very high. |
|
| 56. |
Which of the following technique is used for handling collisions in a hash table?(a) Open addressing(b) Hashing(c) Searching(d) Hash functionThe origin of the question is Hash Tables in portion Hash Tables of Data Structures & Algorithms II had been asked this question during an interview. |
|
Answer» RIGHT ANSWER is (a) Open addressing To explain: Open addressing is the technique which is used for HANDLING COLLISIONS in a hash table. Separate CHAINING is another technique which is used for the same purpose. |
|
| 57. |
By implementing separate chaining using list head we can reduce the number of collisions drastically.(a) True(b) FalseI'd like to ask this question from Hash Tables topic in section Hash Tables of Data Structures & Algorithms IThe question was posed to me in my homework. |
|
Answer» Correct answer is (b) False |
|
| 58. |
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 performancePlease explain the answer as well. |
|
Answer» Correct choice is (a) it is simpler to implement |
|
| 59. |
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) It reduces code complexityMy query is from Direct Addressing Tables in portion Hash Tables of Data Structures & Algorithms IThis question was posed to me at a job interview. |
|
Answer» Correct option is (B) It saves SPACE |
|
| 60. |
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)Question is taken from Direct Addressing Tables in chapter Hash Tables of Data Structures & Algorithms II have been asked this question during an internship interview. |
|
Answer» Right choice is (d) O(1) |
|
| 61. |
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) It reduces code complexityEnquiry is from Direct Addressing Tables topic in division Hash Tables of Data Structures & Algorithms II had been asked this question in an internship interview. |
|
Answer» The correct CHOICE is (b) It saves space |
|
| 62. |
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)This is a very interesting question from Direct Addressing Tables in chapter Hash Tables of Data Structures & Algorithms IThis question was posed to me in examination. |
|
Answer» Right choice is (d) O(1) |
|
| 63. |
What is the search complexity in direct addressing?(a) O(n)(b) O(logn)(c) O(nlogn)(d) O(1)This interesting question is from Direct Addressing Tables in chapter Hash Tables of Data Structures & Algorithms II had been asked this question in examination. |
|
Answer» The CORRECT answer is (d) O(1) |
|
| 64. |
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 smallThe doubt is from Direct Addressing Tables in portion Hash Tables of Data Structures & Algorithms IThis question was addressed to me in homework. |
|
Answer» Right CHOICE is (b) When the universe U of keys is reasonably SMALL |
|
| 65. |
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) Distinct array positions for keys based on priorityQuestion is from Direct Addressing Tables in division Hash Tables of Data Structures & Algorithms IThis question was posed to me during an interview. |
|
Answer» RIGHT option is (a) Distinct array position for every possible KEY For explanation: Direct ADDRESSING is possible only when we can afford to ALLOCATE an array that has ONE position for every possible key. |
|
| 66. |
Did Google conduct a large evaluation for comparing the performance by two technique MinHash and SimHash.(a) True(b) FalseThis key question is from Hash Tables topic in division Hash Tables of Data Structures & Algorithms IThe question was posed to me by my college director while I was bunking the class. |
|
Answer» Correct option is (a) True |
|
| 67. |
Is MinHash used as a tool for association rule learning.(a) True(b) FalseThis intriguing question originated from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms IThe question was asked by my college professor while I was bunking the class. |
|
Answer» Right option is (a) True |
|
| 68. |
How many bits are needed to specify the single permutation by min-wise independent family?(a) O (log n!)(b) O (n!)(c) Ω (n^2)(d) Ω (n)Asked question is from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms IThis question was addressed to me in final exam. |
|
Answer» The correct CHOICE is (d) Ω (n) |
|
| 69. |
What is the time required for single variant hashing to maintain the minimum hash queue?(a) O (log n!)(b) O (n!)(c) O (n^2)(d) O (n)The question is from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms II have been asked this question during an online exam. |
|
Answer» Right choice is (d) O (n) |
|
| 70. |
What is the expected error by the estimator Chernoff bound on the samples performed without replacement?(a) O (log k!)(b) O (k!)(c) O (k^2)(d) O (1/k½)This interesting question is from Hash Tables topic in section Hash Tables of Data Structures & Algorithms II had been asked this question during an online exam. |
|
Answer» The CORRECT choice is (d) O (1/k½) |
|
| 71. |
How many hashes will be needed for calculating Jaccard index with an expected error less than or equal to 0.05?(a) 100(b) 200(c) 300(d) 400My doubt stems from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms IThe question was posed to me by my college professor while I was bunking the class. |
|
Answer» The correct ANSWER is (d) 400 |
|
| 72. |
What is the expected error for estimating the Jaccard index using MinHash scheme for k different hash functions?(a) O (log k!)(b) O (k!)(c) O (k^2)(d) O (1/k½)My query is from Hash Tables topic in portion Hash Tables of Data Structures & Algorithms II got this question by my school teacher while I was bunking the class. |
|
Answer» Right option is (d) O (1/k½) |
|
| 73. |
When are the members of two sets more common relatively?(a) Jaccard Index is Closer to 1(b) Jaccard Index is Closer to 0(c) Jaccard Index is Closer to -1(d) Jaccard Index is Farther to 1Query is from Hash Tables topic in division Hash Tables of Data Structures & Algorithms II got this question during an online exam. |
|
Answer» The correct option is (a) Jaccard INDEX is CLOSER to 1 |
|
| 74. |
What is the value of the Jaccard index when the two sets are disjoint?(a) 1(b) 2(c) 3(d) 0This is a very interesting question from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms II had been asked this question in semester exam. |
|
Answer» Correct answer is (d) 0 |
|
| 75. |
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 CoefficientMy question comes from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms IThis question was addressed to me in a job interview. |
|
Answer» Right option is (b) Jaccard Coefficient Index |
|
| 76. |
Which indicator is used for similarity between two sets?(a) Rope Tree(b) Jaccard Coefficient(c) Tango Tree(d) MinHash CoefficientOrigin of the question is Hash Tables in division Hash Tables of Data Structures & Algorithms IThis question was posed to me in an interview for job. |
|
Answer» RIGHT choice is (b) Jaccard Coefficient For explanation: In computer SCIENCE as WELL as data mining, to find the SIMILARITY between two given sets, a technique called MinHash or min-wise independent permutation scheme is used. It helps in the quick estimation of similarity between two sets. Jaccard Coefficient is used for similarity between two sets. |
|
| 77. |
Which technique was firstly used clustering documents using the similarity of two words or strings?(a) MinHash(b) Stack(c) Priority Queue(d) PAT TreeMy enquiry is from Hash Tables in portion Hash Tables of Data Structures & Algorithms IThe question was asked in quiz. |
|
Answer» Right choice is (a) MinHash |
|
| 78. |
Which technique was firstly used to remove duplicate web pages from search results in AltaVista search engine?(a) MinHash(b) Stack(c) Priority Queue(d) PAT TreeThe query is from Hash Tables topic in division Hash Tables of Data Structures & Algorithms II had been asked this question during an interview. |
|
Answer» Right answer is (a) MinHash |
|
| 79. |
Who invented the MinHash technique?(a) Weiner(b) Samuel F. B. Morse(c) Friedrich Clemens Gerke(d) Andrei BroderThe above asked question is from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms II had been asked this question in an interview for job. |
|
Answer» The correct answer is (d) Andrei BRODER |
|
| 80. |
Which technique is used for finding similarity between two sets?(a) MinHash(b) Stack(c) Priority Queue(d) PAT TreeMy doubt stems from Hash Tables in section Hash Tables of Data Structures & Algorithms IThe question was posed to me in an international level competition. |
|
Answer» Right option is (a) MinHash |
|
| 81. |
Hash tree is used in data synchronisation. In the worst case the data synchronisation takes ______ time.(a) O(logn)(b) O(n^2)(c) O(nlogn)(d) O(n)My enquiry is from Hash Tables in section Hash Tables of Data Structures & Algorithms II had been asked this question by my college professor while I was bunking the class. |
|
Answer» The correct ANSWER is (d) O(n) |
|
| 82. |
Sequential access in a Hash tree is faster than in B-trees.(a) True(b) FalseMy question comes from Hash Tables in chapter Hash Tables of Data Structures & Algorithms IThe question was asked in semester exam. |
|
Answer» Right OPTION is (a) True |
|
| 83. |
What is the worst case time complexity of the insertion in the hash tree?(a) O(logk(n))(b) O(n^2)(c) O(nlogk(n))(d) O(kn)This interesting question is from Hash Tables in division Hash Tables of Data Structures & Algorithms II had been asked this question by my school principal while I was bunking the class. |
|
Answer» The CORRECT choice is (a) O(logk(n)) |
|
| 84. |
Where is the hash tree used?(a) in digital currency(b) in sorting of large data(c) for indexing in databases(d) in encryption of dataThe question is from Hash Tables topic in section Hash Tables of Data Structures & Algorithms II have been asked this question during an internship interview. |
|
Answer» Correct option is (a) in digital currency |
|
| 85. |
What will be the height of the hash tree with branching factor 2 and with 8 records?(a) 3(b) 5(c) 4(d) 6This interesting question is from Hash Tables in portion Hash Tables of Data Structures & Algorithms II got this question in exam. |
|
Answer» Right option is (c) 4 |
|
| 86. |
Hash tree is also known as _____(a) Merkle tree(b) T -tree(c) Hash table(d) B^x-treeMy question is based upon Hash Tables topic in portion Hash Tables of Data Structures & Algorithms II have been asked this question in an interview for internship. |
|
Answer» The correct choice is (a) Merkle TREE |
|
| 87. |
Which of the following is true for a Hash tree?(a) Hashing is used for sequential access(b) Indexing is used for direct access(c) Hash tree allows only sequential access(d) Hashing is used for direct accessMy question comes from Hash Tables in portion Hash Tables of Data Structures & Algorithms IThis question was addressed to me by my school teacher while I was bunking the class. |
|
Answer» The correct option is (d) HASHING is used for direct ACCESS |
|
| 88. |
Which of the following is a widely used form of the hash tree?(a) B+ – tree(b) T tree(c) Tiger tree hash(d) HtreeThe question is from Hash Tables in portion Hash Tables of Data Structures & Algorithms IThe question was posed to me in an internship interview. |
|
Answer» CORRECT option is (c) Tiger tree hash The explanation is: The general form the hash tree which is used widely is the Tiger tree hash. It USES a binary hash tree, USUALLY has a data block size of 1024 BYTES and uses the Tiger hash. |
|
| 89. |
Hash tree is used in effective data verification in distributed systems.(a) True(b) FalseMy query is from Hash Tables topic in section Hash Tables of Data Structures & Algorithms IThis question was addressed to me by my college professor while I was bunking the class. |
|
Answer» The correct choice is (a) True |
|
| 90. |
Hash tree is generalization of ______(a) Heap(b) Hash list(c) BST(d) B – treeThis intriguing question originated from Hash Tables topic in division Hash Tables of Data Structures & Algorithms IThe question was posed to me in homework. |
|
Answer» Correct choice is (b) Hash list |
|
| 91. |
What is the value of m’ if the value of m is 19?(a) 11(b) 18(c) 17(d) 15I'm obligated to ask this question of Hash Tables topic in portion Hash Tables of Data Structures & Algorithms II had been asked this question in homework. |
|
Answer» Right CHOICE is (C) 17 |
|
| 92. |
Double hashing is one of the best methods available for open addressing.(a) True(b) FalseThe query is from Hash Tables topic in division Hash Tables of Data Structures & Algorithms II have been asked this question in an international level competition. |
|
Answer» Right option is (a) True |
|
| 93. |
Collisions can be reduced by choosing a hash function randomly in a way that is independent of the keys that are actually to be stored.(a) True(b) FalseI would like to ask this question from Hash Tables topic in section Hash Tables of Data Structures & Algorithms IThe question was posed to me during an internship interview. |
|
Answer» CORRECT ANSWER is (a) True Explanation: Because of randomization, the algorithm can BEHAVE differently on each execution, providing GOOD average case PERFORMANCE for any input. |
|
| 94. |
What is the average retrieval time when n keys hash to the same slot?(a) Theta(n)(b) Theta(n^2)(c) Theta(nlog n)(d) Big-Oh(n^2)My doubt is from Hash Tables in portion Hash Tables of Data Structures & Algorithms IThe question was posed to me in unit test. |
|
Answer» The correct option is (a) Theta(n) |
|
| 95. |
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) 127This intriguing question comes from Hash Tables in division Hash Tables of Data Structures & Algorithms IThe question was posed to me in unit test. |
|
Answer» Correct CHOICE is (b) 128 |
|
| 96. |
What is the advantage of the multiplication method?(a) only 2 steps are involved(b) using constant(c) value of m not critical(d) simple multiplicationThis key question is from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms IThis question was addressed to me in an online quiz. |
|
Answer» Right answer is (C) VALUE of m not critical |
|
| 97. |
What is the hash function used in multiplication method?(a) h(k) = floor( m(kA mod 1))(b) h(k) = ceil( m(kA mod 1))(c) h(k) = floor(kA mod m)(d) h(k) = ceil( kA mod m)Origin of the question is Hash Tables topic in portion Hash Tables of Data Structures & Algorithms II got this question in an internship interview. |
|
Answer» RIGHT choice is (a) h(k) = floor( m(kA MOD 1)) Explanation: The HASH function can be COMPUTED by multiplying m with the fractional part of kA (kA mod 1) and then computing the floor value of the result. |
|
| 98. |
How many steps are involved in creating a hash function using a multiplication method?(a) 1(b) 4(c) 3(d) 2My doubt is from Hash Tables in chapter Hash Tables of Data Structures & Algorithms IThe question was asked in quiz. |
|
Answer» The correct CHOICE is (d) 2 |
|
| 99. |
Using division method, in a given hash table of size 157, the key of value 172 be placed at position ____(a) 19(b) 72(c) 15(d) 17I would like to ask this question from Hash Tables topic in section Hash Tables of Data Structures & Algorithms IThis question was addressed to me during an interview for a job. |
|
Answer» The correct option is (c) 15 |
|
| 100. |
Which scheme provides good performance?(a) open addressing(b) universal hashing(c) hashing by division(d) hashing by multiplicationQuestion is from Hash Tables in chapter Hash Tables of Data Structures & Algorithms IThis question was posed to me in an international level competition. |
|
Answer» Correct choice is (b) universal HASHING |
|