Hashing and Hash Tables - Problem Set

Download Q&A
Q. If a hash table has a load factor of 0.75, what does this imply?
  • A. The table is full
  • B. The table is half full
  • C. The table is 75% full
  • D. The table has 75 entries
Q. If a hash table has a load factor of 0.75, what does this mean?
  • A. The table is full
  • B. 75% of the table is empty
  • C. 75% of the table is filled with elements
  • D. The table can only hold 75 elements
Q. In a hash table, what is the purpose of a hash function?
  • A. To sort the data
  • B. To convert keys into indices
  • C. To store data in a linked list
  • D. To manage memory allocation
Q. What is a potential drawback of using a hash table?
  • A. It requires more memory than arrays
  • B. It is slower than binary search trees
  • C. It cannot handle dynamic data
  • D. It is not suitable for large datasets
Q. What is the average time complexity for searching an element in a hash table?
  • A. O(n)
  • B. O(log n)
  • C. O(1)
  • D. O(n^2)
Q. Which of the following hash functions is considered a good practice?
  • A. Using the identity function
  • B. Using a simple modulus operation
  • C. Using a complex mathematical function
  • D. Using a random number generator
Q. Which of the following hash functions is considered good practice?
  • A. A function that returns the key itself
  • B. A function that uses a prime number
  • C. A function that always returns the same index
  • D. A function that is linear
Q. Which of the following is a common method for handling collisions in a hash table?
  • A. Chaining
  • B. Sorting
  • C. Binary Search
  • D. Recursion
Showing 1 to 8 of 8 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely