/* NOTE: Your program should not reference the internals of these * structures. That is, it should treat the structures' fields as "private." * Instead, it should use the provided functions. */ struct hash_entry { char *key; void *value; struct hash_entry *next; }; struct hash_table { int table_size; struct hash_entry **table; int size; }; /* Allocates and returns a hash_table structure with the table sized as * indicated in the parameter. */ struct hash_table* hash_create(int table_size); /* Places a key-value association into the table, returning NULL * if the key was not previously in the table or the previous value * associated with the key if the key was already present. */ void* hash_put(struct hash_table *table, char *key, void *value); /* Returns the value associated with the given key in the table, * or NULL if the key is not present in the table. */ void* hash_get(struct hash_table *table, char *key); /* Frees all memory allocated for this hash table. This does not * include any memory referenced by the keys or values. */ void hash_free(struct hash_table *table);