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 of the following best describes a hash function in Artificial Intelligence?
a. Maps values to keys
b. Maps keys to values
c. Arranges data in a tree structure
d. Sorts keys alphabetically
Answer: b. Maps keys to valueserp.metbhujbalknowledgecity - The primary objective of hashing in AI data structures is:
a. To filter data efficiently
b. To provide constant time complexity for searches
c. To compress large datasets
d. To encrypt sensitive data
Answer: b. To provide constant time complexity for searchesexamveda - What is a “collision” in the context of hashing?
a. Two keys hash to different values
b. Multiple keys hash to the same value
c. No keys are hashed
d. Keys are deleted from the hash table
Answer: b. Multiple keys hash to the same valueexamveda - Which of these is a collision resolution technique in hashing?
a. Recursive search
b. Division of table
c. Chaining
d. Serialization
Answer: c. Chainingexamveda - Which property is essential for a hash function in AI?
a. Generates variable-length codes
b. Produces the same output for distinct inputs
c. Distributes keys uniformly
d. Compresses data losslessly
Answer: c. Distributes keys uniformlytestrigor - Open addressing and chaining are methods used to:
a. Avoid redundancy in data
b. Handle collisions in a hash table
c. Encrypt data
d. Optimize sorting algorithms
Answer: b. Handle collisions in a hash tablesanfoundry+1 - The load factor in hashing is defined as:
a. Size of hash table divided by number of elements
b. Ratio of number of elements to size of hash table
c. Number of collisions divided by total keys
d. Unused memory blocks
Answer: b. Ratio of number of elements to size of hash tablescribd+1 - Which hashing technique is free from clustering problems?
a. Linear probing
b. Simple hashing
c. Chaining
d. Double hashing
Answer: d. Double hashingtestbook+1 - What will be the search time in an ideal well-distributed hash table using chaining?
a. O(n)
b. O(1)
c. O(log n)
d. O(n^2)
Answer: b. O(1)sanfoundry+1 - What does the term “re-hashing” mean?
a. Modifying hash function
b. Using a second hash function when a collision occurs
c. Deleting keys and hashing again
d. Searching for duplicate keys
Answer: b. Using a second hash function when a collision occursquestions.examside+1 - Universal hashing is characterized by:
a. Multiplication approach
b. Division-based methods
c. Random selection of hash functions
d. Sorting of keys
Answer: c. Random selection of hash functionssanfoundry - In a hash table, what happens if the table becomes full using open addressing?
a. Collisions increase
b. Table is resized or rehashed
c. Keys are deleted
d. Data is sorted
Answer: b. Table is resized or rehashedscribd+1 - Which of the following is NOT a property of a good hash function?
a. Uniform distribution
b. Few collisions
c. Deterministic output
d. Variable output for same input
Answer: d. Variable output for same inputscribd+1 - A hash table maps:
a. Keys to values
b. Values to keys
c. Data to arrays
d. Values to data
Answer: a. Keys to valueserp.metbhujbalknowledgecity+1 - What is the primary use of hash functions in Artificial Intelligence?
a. Sorting datasets
b. Indexing and fast lookup
c. Data visualization
d. Training neural networks
Answer: b. Indexing and fast lookuptestrigor - Which probing method uses (Hash(key) + i^2) mod TableSize?
a. Linear probing
b. Quadratic probing
c. Chaining
d. Double hashing
Answer: b. Quadratic probingscribd - Which collision resolution technique uses linked lists for each table slot?
a. Open addressing
b. Quadratic probing
c. Chaining
d. Linear probing
Answer: c. Chainingsanfoundry - In double hashing, what determines the step size?
a. Prime number calculation
b. Second hash function
c. Table load factor
d. Original key value
Answer: b. Second hash functionquestions.examside - The “division method” for hashing uses:
a. Multiplication and modulo
b. Exponential calculation
c. Only division operator
d. Addition of key values
Answer: a. Multiplication and modulosanfoundry - Which scenario defines primary clustering?
a. All keys hash to a single value
b. Contiguous block of occupied slots after several collisions
c. Random distribution of data
d. Data is sorted in the table
Answer: b. Contiguous block of occupied slots after several collisionsscribd - The probability of collisions increases if:
a. Hash table size is small and dataset is large
b. Hash function is uniform
c. Load factor is kept low
d. Chaining is used
Answer: a. Hash table size is small and dataset is largescribd+1 - A hash function’s primary goal is:
a. Encryption of data
b. Uniform key distribution
c. Maximizing collisions
d. Data compression
Answer: b. Uniform key distributiontestrigor - Which type of hashing is best for cryptography in AI?
a. SHA-256
b. Linear Probing
c. Chaining
d. Division Method
Answer: a. SHA-256testrigor - What happens when the load factor exceeds 1 in open addressing?
a. Table is resized
b. Chaining is initiated
c. Search time decreases
d. No effect
Answer: a. Table is resizedscribd - Which one of these is a limitation of direct address tables compared to hashing?
a. Requires less space
b. Used for small datasets only
c. Only works for variable keys
d. Allowed for non-numeric values
Answer: b. Used for small datasets onlystudocu - Which of the following options indicates a poor hash function?
a. Even key distribution
b. Many collisions
c. Deterministic output
d. Handles all data
Answer: b. Many collisionsscribd+1 - Which probing technique can lead to secondary clustering?
a. Linear probing
b. Quadratic probing
c. Double hashing
d. Chaining
Answer: b. Quadratic probingscribd - Which of the following is TRUE about hashing in AI search algorithms?
a. It sorts data
b. It speeds up lookups
c. It compresses data
d. It serializes structures
Answer: b. It speeds up lookupstestrigor - In separate chaining, the linked list in each slot stores:
a. Sorted keys
b. All keys hashing to that slot
c. Only unique keys
d. Data in a tree form
Answer: b. All keys hashing to that slotsanfoundry - The expression for linear probing is:
a. h(key) = (Hash(key) + i) mod TableSize
b. h(key) = (Hash(key) + i^2) mod TableSize
c. h(key) = (Hash(key) + hash2(key) * i) mod TableSize
d. h(key) = Hash(key) / TableSize
Answer: a. h(key) = (Hash(key) + i) mod TableSizescribd - The term used to describe the phenomenon where a group of consecutive occupied slots builds up is:
a. Load factor
b. Primary clustering
c. Universal hashing
d. Linear arrangement
Answer: b. Primary clusteringscribd+1 - Double hashing reduces clustering by:
a. Changing the table size
b. Using two independent hash functions
c. Deleting colliding keys
d. Reordering keys
Answer: b. Using two independent hash functionsquestions.examside - Cryptographic hash functions provide:
a. Only short hashes
b. Unpredictability and resistance to collision
c. Variable length output
d. Sorting mechanisms
Answer: b. Unpredictability and resistance to collisiontestrigor - If multiple keys hash to the same value in open addressing, what technique is typically used?
a. Chaining
b. Probing
c. Sorting
d. Partitioning
Answer: b. Probingtestbook+1 - What defines a good hash function in the context of AI data storage?
a. Simple implementation only
b. Uniform distribution with low collision rate
c. Maximum clustering
d. Longest output
Answer: b. Uniform distribution with low collision ratetestrigor - In which scenario would chaining NOT be efficient?
a. When hash table size is very large
b. When each slot has many collisions
c. When linked list overhead is minimal
d. When keys are unique
Answer: b. When each slot has many collisionssanfoundry - Which one of the following statements is TRUE about open addressing?
a. Collided keys are stored in a separate chain
b. Collided keys are searched for empty slots using a sequence
c. Table always requires resizing after each insertion
d. Keys are deleted instead of handled
Answer: b. Collided keys are searched for empty slots using a sequencetestbook+1 - A hash table with a low load factor will generally:
a. Increase collision probability
b. Reduce collision probability
c. Increase probe sequences
d. Increase memory overhead only
Answer: b. Reduce collision probabilityexamveda+1 - In context of AI, using a cryptographically secure hash like SHA-256 primarily ensures:
a. Fast search
b. Data integrity and security
c. Sorted order
d. Space optimization
Answer: b. Data integrity and securitytestrigor - Hashing in machine learning applications is often used for:
a. Dimensionality reduction and feature encoding
b. Only data encryption
c. Visualization generation
d. Hyperparameter optimization
Answer: a. Dimensionality reduction and feature encodingtestrigor - Linear probing can result in:
a. No clustering at all
b. Primary clustering
c. Secondary clustering only
d. No collisions
Answer: b. Primary clusteringscribd+1 - The formula for double hashing is:
a. h(key) = (hash1(key) + i * hash2(key)) mod TableSize
b. h(key) = (hash1(key) – hash2(key)) mod TableSize
c. h(key) = (hash1(key) × hash2(key)) mod TableSize
d. h(key) = hash2(key) mod TableSize
Answer: a. h(key) = (hash1(key) + i * hash2(key)) mod TableSizequestions.examside - Cryptographic hash functions such as SHA and MD5 in AI systems are often used for:
a. Sorting large datasets
b. Checking data integrity
c. Hyperparameter tuning
d. Visualization pipelines
Answer: b. Checking data integritytestrigor - The main purpose of hashing in hash-based AI algorithms (e.g. cuckoo hashing) is to:
a. Allow efficient insertion, deletion, and lookup
b. Build neural networks
c. Compress video data
d. Increase clustering
Answer: a. Allow efficient insertion, deletion, and lookuptestrigor - In a hash table using chaining, the worst-case time complexity for searching is:
a. O(1)
b. O(n)
c. O(log n)
d. O(n^2)
Answer: b. O(n)sanfoundry - Which scheme can theoretically guarantee O(1) search if the hash function is perfect?
a. Direct addressing
b. Division method
c. Chaining
d. Quadratic probing
Answer: a. Direct addressingstudocu - In AI, the role of hash functions in similarity search (e.g., LSH – Locality Sensitive Hashing) is to:
a. Hash similar items to similar hash values
b. Always hash different items to same hash value
c. Hash all items randomly
d. Sort items in the input order
Answer: a. Hash similar items to similar hash valuestestrigor - Load factor in a hash table is managed to ensure:
a. Optimal memory usage and minimal collisions
b. Maximum output length
c. Data redundancy
d. Slow search speed
Answer: a. Optimal memory usage and minimal collisionsexamveda+1 - Which method can reduce deletion problems in open addressing?
a. Mark slots as deleted using “tombstones”
b. Use secondary chaining
c. Resize table
d. Remove primary slots
Answer: a. Mark slots as deleted using “tombstones”testbook - Which characteristic of hash functions is essential for cryptographic applications in AI?
a. Deterministic and preimage resistance
b. High clustering rate
c. Variable hashing
d. Non-deterministic outputs
Answer: a. Deterministic and preimage resistancetestrigor
- https://erp.metbhujbalknowledgecity.ac.in/StudyMaterial/01SJ072012006800108.pdf
- https://www.examveda.com/data-structure/practice-mcq-question-on-hashing/
- https://testrigor.com/blog/what-is-hashing/
- https://www.sanfoundry.com/hashing-functions-multiple-choice-questions-answers-mcqs/
- https://www.scribd.com/document/726955228/hashing-mcq
- https://testbook.com/objective-questions/mcq-on-hashing–5eea6a0c39140f30f369e0c1
- https://questions.examside.com/past-years/gate/gate-cse/data-structures/hashing
- https://www.sanfoundry.com/hash-tables-chaining-linked-lists-multiple-choice-questions-answers-mcqs/
- https://www.scribd.com/document/500176852/unit-1-Hashing-mcqs
- https://www.studocu.com/in/document/university-of-petroleum-and-energy-studies/data-structures-and-algorithms/hashing-practice-questions/33998180
- https://www.geeksforgeeks.org/quizzes/top-mcqs-on-hash-data-strcuture-with-answers/
- https://www.scribd.com/document/919701742/Linked-Lists-and-Hashing-MCQ-Answers
- https://testbook.com/objective-questions/mcq-on-hashing–5eea6a0939140f30f369da76
- https://www.geeksforgeeks.org/dsa/practice-problems-on-hashing/
- https://wayground.com/admin/quiz/61a5ee364fcd4d001d201d17/practice-problems-on-hashing
- https://www.sanfoundry.com/data-structure-questions-answers-hash-tables/
- https://www.studocu.com/row/document/jamaa%D8%A9-alkahr%D8%A9/design-analysis-and-algorithms/algorithm-mcq-mcq/44619494
- https://www.scribd.com/document/876916036/Hashing-Practice-Questions-with-Solutions-21052025-101929am
- https://www.includehelp.com/mcq/dbms-hashing-mcqs.aspx
- https://www.youtube.com/watch?v=6CxXlSHZfNA