Implement a hash table with chaining
Analyze the implement a hash table with chaining.
Examples
Input: "test_input_1"
Output: "output_1"
Input: "test_input_2"
Output: "output_2"
Hints
Start by implementing a basic hash function that maps keys to indices within the array size, ensuring it distributes keys uniformly.
Design a linked list structure to handle collisions, where each bucket in the hash table array points to a list of key-value pairs.
Implement dynamic resizing of the hash table (e.g., doubling the array size when the load factor exceeds a threshold) while rehashing all existing key-value pairs into the new array.
Implement a hash table with chaining
Analyze the implement a hash table with chaining.