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.
| 1. | 
                                    Which of the following is not a technique to avoid a collision? | 
                            
| A. | Make the hash function appear random | 
| B. | Use the chaining method | 
| C. | Use uniform hashing | 
| D. | Increasing hash table size | 
| Answer» E. | |
| 2. | 
                                    Which of the following is a widely used form of the hash tree? | 
                            
| A. | B+ – tree | 
| B. | T tree | 
| C. | Tiger tree hash | 
| D. | Htree | 
| Answer» D. Htree | |
| 3. | 
                                    What is the formula to find the expected number of probes for an unsuccessful search in linear probing? | 
                            
| A. | ½(1+1/(1-⅄)) | 
| B. | ½(1+1/(1-⅄)2) | 
| C. | ½(1+1/(1+⅄)) | 
| D. | ½(1+1/(1+⅄)(1-⅄)) | 
| Answer» B. ½(1+1/(1-⅄)2) | |
| 4. | 
                                    What is the worst case search time of a hashing using separate chaining algorithm? | 
                            
| A. | O(N log N) | 
| B. | O(N) | 
| C. | O(N2) | 
| D. | O(N3) | 
| Answer» C. O(N2) | |
| 5. | 
                                    How many probes are required on average for insertion and successful search? | 
                            
| A. | 4 and 10 | 
| B. | 2 and 6 | 
| C. | 2.5 and 1.5 | 
| D. | 3.5 and 1.5 | 
| Answer» D. 3.5 and 1.5 | |
| 6. | 
                                    Hash tree is used in data synchronisation. In the worst case the data synchronisation takes ______ time. | 
                            
| A. | O(logn) | 
| B. | O(n2) | 
| C. | O(nlogn) | 
| D. | O(n) | 
| Answer» E. | |
| 7. | 
                                    Which of the following is identical to that of a separate chaining hash node? | 
                            
| A. | Linked list | 
| B. | Array | 
| C. | Stack | 
| D. | Queue | 
| Answer» B. Array | |
| 8. | 
                                    What can be the value of m in the division method? | 
                            
| A. | Any prime number | 
| B. | Any even number | 
| C. | 2p – 1 | 
| D. | 2p | 
| Answer» B. Any even number | |
| 9. | 
                                    What is the value of h(k) for the key 123456? Given: p=14, s=2654435769, w=32 | 
                            
| A. | 123 | 
| B. | 456 | 
| C. | 70 | 
| D. | 67 | 
| Answer» E. | |
| 10. | 
                                    What is the hash function used in Double Hashing? | 
                            
| A. | (h1(k) - i*h2(k))mod m | 
| B. | h1(k) + h2(k) | 
| C. | (h1(k) + i*h2(k))mod m | 
| D. | (h1(k) + h2(k))mod m | 
| Answer» D. (h1(k) + h2(k))mod m | |
| 11. | 
                                    ___________ is not a theoretical problem but actually occurs in real implementations of probing. | 
                            
| A. | Hashing | 
| B. | Clustering | 
| C. | Rehashing | 
| D. | Collision | 
| Answer» C. Rehashing | |
| 12. | 
                                    Which of the following is not a collision resolution strategy for open addressing? | 
                            
| A. | Linear probing | 
| B. | Quadratic probing | 
| C. | Double hashing | 
| D. | Rehashing | 
| Answer» E. | |
| 13. | 
                                    Which of the following schemes does quadratic probing come under? | 
                            
| A. | rehashing | 
| B. | extended hashing | 
| C. | separate chaining | 
| D. | open addressing | 
| Answer» E. | |
| 14. | 
                                    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. | |
| 15. | 
                                    Which of the following is a disadvantage of using separate chaining using linked lists? | 
                            
| A. | It requires many pointers | 
| B. | It requires linked lists | 
| C. | It uses array | 
| D. | It does not resolve collision | 
| Answer» B. It requires linked lists | |
| 16. | 
                                    Which hash function satisfies the condition of simple uniform hashing? | 
                            
| A. | h(k) = lowerbound(km) | 
| B. | h(k)= upperbound(mk) | 
| C. | h(k)= lowerbound(k) | 
| D. | h(k)= upperbound(k) | 
| Answer» B. h(k)= upperbound(mk) | |
| 17. | 
                                    Who invented the MinHash technique? | 
                            
| A. | Weiner | 
| B. | Samuel F. B. Morse | 
| C. | Friedrich Clemens Gerke | 
| D. | Andrei Broder | 
| Answer» E. | |
| 18. | 
                                    What is the value of m' if the value of m is 19? | 
                            
| A. | 11 | 
| B. | 18 | 
| C. | 17 | 
| D. | 15 | 
| Answer» D. 15 | |
| 19. | 
                                    Hashing can be used in online spelling checkers. | 
                            
| A. | True | 
| B. | False | 
| Answer» B. False | |
| 20. | 
                                    Which of the following is the hashing function for separate chaining? | 
                            
| A. | H(x)=(hash(x)+f(i)) mod table size | 
| B. | H(x)=hash(x)+i2 mod table size | 
| C. | H(x)=x mod table size | 
| D. | H(x)=x mod (table size * 2) | 
| Answer» D. H(x)=x mod (table size * 2) | |
| 21. | 
                                    Hash tree is generalization of ______ | 
                            
| A. | Heap | 
| B. | Hash list | 
| C. | BST | 
| D. | B – tree | 
| Answer» C. BST | |
| 22. | 
                                    How many constraints are to be met to successfully implement quadratic probing? | 
                            
| A. | 1 | 
| B. | 2 | 
| C. | 3 | 
| D. | 4 | 
| Answer» C. 3 | |
| 23. | 
                                    Which of the following is the correct function definition for quadratic probing? | 
                            
| A. | F(i)=i2 | 
| B. | F(i)=i | 
| C. | F(i)=i+1 | 
| D. | F(i)=i2+1 | 
| Answer» B. F(i)=i | |
| 24. | 
                                    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 access | 
| Answer» E. | |
| 25. | 
                                    Which of the following is not a collision resolution technique? | 
                            
| A. | Separate chaining | 
| B. | Linear probing | 
| C. | Quadratic probing | 
| D. | Hashing | 
| Answer» E. | |
| 26. | 
                                    In a hash table of size 10, where is element 7 placed? | 
                            
| A. | 6 | 
| B. | 7 | 
| C. | 17 | 
| D. | 16 | 
| Answer» C. 17 | |
| 27. | 
                                    Which indicator is used for similarity between two sets? | 
                            
| A. | Rope Tree | 
| B. | Jaccard Coefficient | 
| C. | Tango Tree | 
| D. | MinHash Coefficient | 
| Answer» C. Tango Tree | |
| 28. | 
                                    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 multiplication | 
| Answer» D. simple multiplication | |
| 29. | 
                                    Sequential access in a Hash tree is faster than in B-trees. | 
                            
| A. | True | 
| B. | False | 
| Answer» B. False | |
| 30. | 
                                    The case in which a key other than the desired one is kept at the identified location is called? | 
                            
| A. | Hashing | 
| B. | Collision | 
| C. | Chaining | 
| D. | Open addressing | 
| Answer» C. Chaining | |
| 31. | 
                                    Which of the following operations are done in a hash table? | 
                            
| A. | Insert only | 
| B. | Search only | 
| C. | Insert and search | 
| D. | Replace | 
| Answer» D. Replace | |
| 32. | 
                                    What should be the load factor for separate chaining hashing? | 
                            
| A. | 0.5 | 
| B. | 1 | 
| C. | 1.5 | 
| D. | 2 | 
| Answer» C. 1.5 | |
| 33. | 
                                    In linear probing, the cost of an unsuccessful search can be used to compute the average cost of a successful search. | 
                            
| A. | True | 
| B. | False | 
| Answer» B. False | |
| 34. | 
                                    The value of h2(k) can be composite relatively to the hash table size m. | 
                            
| A. | True | 
| B. | False | 
| Answer» C. | |
| 35. | 
                                    What is the worst case time complexity of the insertion in the hash tree? | 
                            
| A. | O(logk(n)) | 
| B. | O(n2) | 
| C. | O(nlogk(n)) | 
| D. | O(kn) | 
| Answer» B. O(n2) | |
| 36. | 
                                    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 data | 
| Answer» B. in sorting of large data | |
| 37. | 
                                    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. | 17 | 
| Answer» D. 17 | |
| 38. | 
                                    Double hashing is one of the best methods available for open addressing. | 
                            
| A. | True | 
| B. | False | 
| Answer» B. False | |
| 39. | 
                                    A good hash approach is to derive the hash value that is expected to be dependent of any patterns that might exist in the data. | 
                            
| A. | True | 
| B. | False | 
| Answer» C. | |
| 40. | 
                                    Hash tree is also known as _____ | 
                            
| A. | Merkle tree | 
| B. | T -tree | 
| C. | Hash table | 
| D. | Bx-tree | 
| Answer» B. T -tree | |
| 41. | 
                                    Which technique is used for finding similarity between two sets? | 
                            
| A. | MinHash | 
| B. | Stack | 
| C. | Priority Queue | 
| D. | PAT Tree | 
| Answer» B. Stack | |
| 42. | 
                                    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) | 
| Answer» B. h(k) = ceil( m(kA mod 1)) | |
| 43. | 
                                    How many steps are involved in creating a hash function using a multiplication method? | 
                            
| A. | 1 | 
| B. | 4 | 
| C. | 3 | 
| D. | 2 | 
| Answer» E. | |
| 44. | 
                                    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. | False | 
| Answer» B. False | |
| 45. | 
                                    Hash tree is used in effective data verification in distributed systems. | 
                            
| A. | True | 
| B. | False | 
| Answer» B. False | |
| 46. | 
                                    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 Tree | 
| Answer» B. Stack | |
| 47. | 
                                    What data organization method is used in hash tables? | 
                            
| A. | Stack | 
| B. | Array | 
| C. | Linked list | 
| D. | Queue | 
| Answer» D. Queue | |
| 48. | 
                                    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 1 | 
| Answer» B. Jaccard Index is Closer to 0 | |
| 49. | 
                                    Which scheme provides good performance? | 
                            
| A. | open addressing | 
| B. | universal hashing | 
| C. | hashing by division | 
| D. | hashing by multiplication | 
| Answer» C. hashing by division | |
| 50. | 
                                    Hashing is the problem of finding an appropriate mapping of keys into addresses. | 
                            
| A. | True | 
| B. | False | 
| Answer» B. False | |