Question

In a data analysis application, a hash table is used to store key-value pairs for fast lookups. What is the primary goal of a good hash function?

A To minimize memory usage
B To ensure elements are stored in sorted order
C To produce unique hash codes and distribute keys uniformly
D To allow O(1) worst-case time complexity for all operations
E To prevent data modification
Practice Next

Hey! Ask a query