#include #include #include typedef struct hashtable *HashTable; typedef int Value; typedef int Key; /** Creates a new hash table */ HashTable HashTableNew(void); /** Frees all memory allocated to the hash table */ void HashTableFree(HashTable ht); /** Inserts a key-value pair into the hash table If the key already exists, replaces the value */ void HashTableInsert(HashTable ht, Key key, Value value); /** Returns true if the hash table contains the given key, and false otherwise */ bool HashTableContains(HashTable ht, Key key); /** Returns the value associated with the given key Assumes that the key exists */ Value HashTableGet(HashTable ht, Key key); /** Deletes the key-value pair associated with the given key */ void HashTableDelete(HashTable ht, Key key); /** Returns the number of key-value pairs in the hash table */ int HashTableSize(HashTable ht); void HashTableShow(HashTable ht);