What is the purpose of a hash function?
Q1. What is the purpose of a hash function?
Answer: To map data to a fixed-size index
Explanation: A hash function maps input data of any size to a fixed-size index, enabling efficient storage and retrieval of data in a hash table.