Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
Overall MCQs for Reference
- Which data structure uses extra memory for faster access by employing a hash function?
a. Stack
b. Array
c. Hash table
d. Linked list
Answer: c. Hash tabletestbook - What is the main purpose of hashing in data structures?
a. To provide constant time complexity for searches
b. To sort elements
c. To compress data
d. To increase memory usage
Answer: a. To provide constant time complexity for searchesexamveda - What describes a collision in a hash table?
a. Two entries with different keys have the same hash value
b. Entries with identical data
c. Entries with different data have the same key
d. Same key, different values
Answer: a. Two entries with different keys have the same hash valuesanfoundry - Which time complexity is achieved by a good hash function during search?
a. O(n)
b. O(log n)
c. O(1)
d. O(n²)
Answer: c. O(1)sanfoundry - Which technique resolves collisions by placing the element in the next available slot?
a. Double hashing
b. Quadratic probing
c. Linear probing
d. Chaining
Answer: c. Linear probingtestbook - What is the method called where each slot contains a linked list for collision resolution?
a. Double hashing
b. Linear probing
c. Separate chaining
d. Quadratic probing
Answer: c. Separate chainingtestbook - What defines a secondary clustering problem?
a. Collisions resolved with separate chaining
b. Clustering caused by quadratic and linear probing
c. Random probing
d. Chaining on even slots
Answer: b. Clustering caused by quadratic and linear probingtestbook - Which hashing method is free from clustering problems?
a. Quadratic probing
b. Linear probing
c. Double hashing
d. Separate chaining
Answer: c. Double hashingtestbook - A hash table of size 7 uses function H(k) = k % 7 and random probing. Where will key 25 be placed after collision?
a. Position 1
b. Position 2
c. Position 3
d. Position 4
Answer: b. Position 2testbook - What is the expected number of keys per slot if n keys are hashed into m slots?
a. n/m
b. n+m
c. n-m
d. n*m
Answer: a. n/mtestbook - What type of hashing divides the key, squares it, and selects middle digits for hashing?
a. Division
b. Folding
c. Mid-square
d. Double hashing
Answer: c. Mid-squarescribd - What is the main goal when using hashing in AI for searching?
a. Security
b. Speed
c. Compression
d. Visualization
Answer: b. Speedtestbook - Which scenario leads to linear running time in a linear-probing hash table?
a. All keys hash to different indices
b. All keys hash to same index
c. All keys hash to even-numbered indices
d. All keys hash to prime indices
Answer: b. All keys hash to same indexsanfoundry - Which probing technique uses a quadratic function for determining the next available slot?
a. Linear probing
b. Quadratic probing
c. Chaining
d. Double hashing
Answer: b. Quadratic probingtestbook - Which hashing method can store elements in chains?
a. Open addressing
b. Separate chaining
c. Direct addressing
d. Linear probing
Answer: b. Separate chainingtestbook - What is the performance impact of clustering in hash tables?
a. Reduces search speed
b. Increases memory
c. Reduces collisions
d. Increases security
Answer: a. Reduces search speedtestbook - What is a major drawback of linear probing?
a. Exponential waiting time
b. Memory leak
c. Clustering
d. Input overflow
Answer: c. Clusteringtestbook - What is the primary advantage of double hashing?
a. Simple implementation
b. Clustering resistance
c. Reduced speed
d. Increased collisions
Answer: b. Clustering resistancetestbook - What kind of hash function is ?
a. Division
b. Multiplication
c. Mid-square
d. Folding
Answer: a. Divisionscholarhat - Which hashing technique uses multiple hash functions for allocation?
a. Universal hashing
b. Multiple choice hashing
c. Division method
d. Random hashing
Answer: b. Multiple choice hashingtutorialspoint - What is the expected chain length if 9 keys are inserted in 9 slots using chaining?
a. 1
b. 2
c. 3
d. 4
Answer: a. 1testbook - Which technique uses buckets for storing colliding keys?
a. Linear probing
b. Open addressing
c. Chaining
d. Array allocation
Answer: c. Chaininggeeksforgeeks - Which hashing technique is also known as closed addressing?
a. Chaining
b. Open addressing
c. Linear probing
d. Division method
Answer: a. Chainingintellipaat - What ensures constant search time in hash-based searching?
a. Unique hash value per key
b. Chained elements
c. Quadratic probe function
d. Sorted keys
Answer: a. Unique hash value per keytestbook - What type of hashing assigns each key a slot independently?
a. Simple uniform hashing
b. Double hashing
c. Chaining
d. Open hashing
Answer: a. Simple uniform hashingtestbook - If all hash keys map to the same slot, what is the search time?
a. Constant
b. Linear
c. Logarithmic
d. Quadratic
Answer: b. Linearsanfoundry - What is the expected number of collisions involving a specific key when n keys hash into m slots (n ≤ m)?
a. Less than 1
b. Less than n
c. Less than m
d. Less than n/2
Answer: a. Less than 1sanfoundry - Which hashing technique uses parts of the key added together for the final address?
a. Division
b. Folding
c. Multiplication
d. Chaining
Answer: b. Foldingscholarhat - Which collision resolution technique is most likely to produce long search chains?
a. Chaining
b. Open addressing
c. Linear probing
d. Double hashing
Answer: c. Linear probingtestbook - What is used to reduce clustering in open addressing?
a. Chaining
b. Quadratic probing
c. Division method
d. Linear probing
Answer: b. Quadratic probingtestbook - Which type of hash table stores key-value pairs?
a. Heaps
b. Hash tables
c. Trees
d. Arrays
Answer: b. Hash tablessanfoundry - Which method squares the key for address selection?
a. Multiplication
b. Folding
c. Mid-square
d. Division
Answer: c. Mid-squarescribd - What data structure is used for chained hash tables?
a. Array
b. Stack
c. Linked list
d. Queue
Answer: c. Linked listtestbook - What property is necessary for a good hash function?
a. Uniform distribution
b. Repeated values
c. Fixed outcome
d. Sequential keys
Answer: a. Uniform distributiontestbook - Universal hashing provides better performance due to?
a. Division method
b. Unique randomization
c. Static assignment
d. Buckets
Answer: b. Unique randomizationsanfoundry - Which algorithm is commonly used in AI decision-making processes?
a. Decision Trees
b. Sorting algorithms
c. Hashing algorithms
d. Searching algorithms
Answer: c. Hashing algorithmsjavaguides - What is the main use of hashing in cryptography?
a. Storing keys
b. Data encryption
c. Integrity verification
d. Data visualization
Answer: c. Integrity verificationgithub - What method divides the key by a prime for hash address?
a. Multiplication
b. Division
c. Square-root
d. Folding
Answer: b. Divisionscholarhat - In hash-based image retrieval for AI, what’s commonly compared?
a. Pixel values
b. Hash values
c. Array size
d. Bitmaps
Answer: b. Hash valuesscholarhat - What is a load factor in hash tables?
a. Ratio of filled slots to total slots
b. Hash function complexity
c. Probing chain length
d. Table size
Answer: a. Ratio of filled slots to total slotstestbook - What does rehashing do?
a. Recomputes hash functions on all keys
b. Replaces keys
c. Changes table size
d. Creates collisions
Answer: a. Recomputes hash functions on all keystestbook - Which hash function uses irrational numbers for key multiplication?
a. Division method
b. Multiplication method
c. Folding method
d. Chaining
Answer: b. Multiplication methodtestbook - What role does hashing play in data deduplication within AI?
a. Identify duplicates via hash comparison
b. Compress files
c. Encrypt data
d. Sort values
Answer: a. Identify duplicates via hash comparisonintellipaat - If a hash chain has length zero, what does it mean?
a. Slot is empty
b. Slot is overloaded
c. Element is duplicated
d. Key is missing
Answer: a. Slot is emptytestbook - What kind of hashing uses randomization to map keys?
a. Universal hashing
b. Division method
c. Open addressing
d. Chaining
Answer: a. Universal hashingsanfoundry - Which hash table structure can suffer from primary clustering?
a. Separate chaining
b. Linear probing
c. Double hashing
d. Universal hashing
Answer: b. Linear probingtestbook - What is the first step in building a hash table for AI applications?
a. Select a hash function
b. Insert keys
c. Analyze clustering
d. Choose probe method
Answer: a. Select a hash functionscholarhat - In distributed systems, what is hashing mainly used for?
a. Data partitioning
b. Data compression
c. Encryption
d. Data sorting
Answer: a. Data partitioninggithub - What happens when the load factor of a hash table exceeds a threshold?
a. Rehashing
b. Deallocation
c. Collision
d. Sorting
Answer: a. Rehashingtestbook - Which password hash algorithm is recommended for AI security systems?
a. MD5
b. SHA-1
c. Argon2
d. SHA-256
Answer: c. Argon2intellipaat
- https://testbook.com/objective-questions/mcq-on-hashing–5eea6a0c39140f30f369e0c1
- https://www.examveda.com/data-structure/practice-mcq-question-on-hashing/
- https://www.sanfoundry.com/database-mcqs-hashing-techniques/
- https://www.scribd.com/document/880206586/Unit-v-Searching-Sorting-Hashing-MCQs
- https://www.scholarhat.com/tutorial/datastructures/hashing-in-data-structures
- https://www.tutorialspoint.com/multiple-choice-hashing
- https://www.geeksforgeeks.org/dsa/practice-problems-on-hashing/
- https://intellipaat.com/blog/hashing-in-data-structure/
- https://www.sanfoundry.com/hashing-functions-multiple-choice-questions-answers-mcqs/
- https://www.javaguides.net/2024/09/artificial-intelligence-mcq-questions.html
- https://github.com/Devinterview-io/hash-table-data-structure-interview-questions
- https://testbook.com/objective-questions/mcq-on-hashing–5eea6a0939140f30f369da76
- https://www.geeksforgeeks.org/quizzes/top-mcqs-on-hash-data-strcuture-with-answers/
- https://www.scribd.com/document/726955228/hashing-mcq
- https://erp.metbhujbalknowledgecity.ac.in/StudyMaterial/01SJ072012006800108.pdf
- https://www.sanfoundry.com/hash-tables-chaining-linked-lists-multiple-choice-questions-answers-mcqs/
- https://wayground.com/admin/quiz/61a5ee364fcd4d001d201d17/practice-problems-on-hashing
- https://www.includehelp.com/mcq/dbms-hashing-mcqs.aspx
- https://www.geeksforgeeks.org/dsa/top-20-hashing-technique-based-interview-questions/
- https://mcqmate.com/topic/data-structures/c/searching-sorting-and-hashing-techniques