Blog

MCQs

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

 

  1. 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​
  2. 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​
  3. 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​
  4. 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​
  5. 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​
  6. 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​
  7. 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​
  8. Which hashing method is free from clustering problems?
    a. Quadratic probing
    b. Linear probing
    c. Double hashing
    d. Separate chaining
    Answer: c. Double hashingtestbook​
  9. 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​
  10. 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​
  11. 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​
  12. What is the main goal when using hashing in AI for searching?
    a. Security
    b. Speed
    c. Compression
    d. Visualization
    Answer: b. Speedtestbook​
  13. 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​
  14. 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​
  15. Which hashing method can store elements in chains?
    a. Open addressing
    b. Separate chaining
    c. Direct addressing
    d. Linear probing
    Answer: b. Separate chainingtestbook​
  16. 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​
  17. What is a major drawback of linear probing?
    a. Exponential waiting time
    b. Memory leak
    c. Clustering
    d. Input overflow
    Answer: c. Clusteringtestbook​
  18. What is the primary advantage of double hashing?
    a. Simple implementation
    b. Clustering resistance
    c. Reduced speed
    d. Increased collisions
    Answer: b. Clustering resistancetestbook​
  19. What kind of hash function is  ?
    a. Division
    b. Multiplication
    c. Mid-square
    d. Folding
    Answer: a. Divisionscholarhat​
  20. 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​
  21. 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​
  22. Which technique uses buckets for storing colliding keys?
    a. Linear probing
    b. Open addressing
    c. Chaining
    d. Array allocation
    Answer: c. Chaininggeeksforgeeks​
  23. Which hashing technique is also known as closed addressing?
    a. Chaining
    b. Open addressing
    c. Linear probing
    d. Division method
    Answer: a. Chainingintellipaat​
  24. 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​
  25. 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​
  26. 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​
  27. 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​
  28. 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​
  29. 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​
  30. What is used to reduce clustering in open addressing?
    a. Chaining
    b. Quadratic probing
    c. Division method
    d. Linear probing
    Answer: b. Quadratic probingtestbook​
  31. Which type of hash table stores key-value pairs?
    a. Heaps
    b. Hash tables
    c. Trees
    d. Arrays
    Answer: b. Hash tablessanfoundry​
  32. Which method squares the key for address selection?
    a. Multiplication
    b. Folding
    c. Mid-square
    d. Division
    Answer: c. Mid-squarescribd​
  33. What data structure is used for chained hash tables?
    a. Array
    b. Stack
    c. Linked list
    d. Queue
    Answer: c. Linked listtestbook​
  34. 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​
  35. Universal hashing provides better performance due to?
    a. Division method
    b. Unique randomization
    c. Static assignment
    d. Buckets
    Answer: b. Unique randomizationsanfoundry​
  36. 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​
  37. 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​
  38. What method divides the key by a prime for hash address?
    a. Multiplication
    b. Division
    c. Square-root
    d. Folding
    Answer: b. Divisionscholarhat​
  39. 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​
  40. 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​
  41. 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​
  42. Which hash function uses irrational numbers for key multiplication?
    a. Division method
    b. Multiplication method
    c. Folding method
    d. Chaining
    Answer: b. Multiplication methodtestbook​
  43. 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​
  44. 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​
  45. What kind of hashing uses randomization to map keys?
    a. Universal hashing
    b. Division method
    c. Open addressing
    d. Chaining
    Answer: a. Universal hashingsanfoundry​
  46. 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​
  47. 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​
  48. In distributed systems, what is hashing mainly used for?
    a. Data partitioning
    b. Data compression
    c. Encryption
    d. Data sorting
    Answer: a. Data partitioninggithub​
  49. What happens when the load factor of a hash table exceeds a threshold?
    a. Rehashing
    b. Deallocation
    c. Collision
    d. Sorting
    Answer: a. Rehashingtestbook​
  50. Which password hash algorithm is recommended for AI security systems?
    a. MD5
    b. SHA-1
    c. Argon2
    d. SHA-256
    Answer: c. Argon2intellipaat​

 

  1. https://testbook.com/objective-questions/mcq-on-hashing–5eea6a0c39140f30f369e0c1
  2. https://www.examveda.com/data-structure/practice-mcq-question-on-hashing/
  3. https://www.sanfoundry.com/database-mcqs-hashing-techniques/
  4. https://www.scribd.com/document/880206586/Unit-v-Searching-Sorting-Hashing-MCQs
  5. https://www.scholarhat.com/tutorial/datastructures/hashing-in-data-structures
  6. https://www.tutorialspoint.com/multiple-choice-hashing
  7. https://www.geeksforgeeks.org/dsa/practice-problems-on-hashing/
  8. https://intellipaat.com/blog/hashing-in-data-structure/
  9. https://www.sanfoundry.com/hashing-functions-multiple-choice-questions-answers-mcqs/
  10. https://www.javaguides.net/2024/09/artificial-intelligence-mcq-questions.html
  11. https://github.com/Devinterview-io/hash-table-data-structure-interview-questions
  12. https://testbook.com/objective-questions/mcq-on-hashing–5eea6a0939140f30f369da76
  13. https://www.geeksforgeeks.org/quizzes/top-mcqs-on-hash-data-strcuture-with-answers/
  14. https://www.scribd.com/document/726955228/hashing-mcq
  15. https://erp.metbhujbalknowledgecity.ac.in/StudyMaterial/01SJ072012006800108.pdf
  16. https://www.sanfoundry.com/hash-tables-chaining-linked-lists-multiple-choice-questions-answers-mcqs/
  17. https://wayground.com/admin/quiz/61a5ee364fcd4d001d201d17/practice-problems-on-hashing
  18. https://www.includehelp.com/mcq/dbms-hashing-mcqs.aspx
  19. https://www.geeksforgeeks.org/dsa/top-20-hashing-technique-based-interview-questions/
  20. https://mcqmate.com/topic/data-structures/c/searching-sorting-and-hashing-techniques

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!