What is a hash function?
2024
What is a hash function?
- A.
A function has allocated memory to keys
- B.
A function that computes the location of the key in the array
- C.
A function that creates an array
- D.
A function that computes the location of the values in the array
Attempted by 143 students.
Show answer & explanation
Correct answer: B
Answer: b
Explanation: In a hash table, there are fewer array positions than the keys, so the position of the key in the array has to be computed, this is done using the hash function.