What is the purpose of a hash function in a hash table?
Q1. What is the purpose of a hash function in a hash table?
Answer: To map keys to indices
Explanation: A hash function maps keys to indices of a backing array, allowing for fast lookups, insertions, and deletions in a hash table.