This project is an implementation of a simple hash table in the C programming language. It includes basic operations such as insertion, search, and deletion of key-value pairs.
- Insertion: Add new key-value pairs to the hash table.
- Search: Retrieve the value associated with a given key.
- Deletion: Remove key-value pairs from the hash table.
- Collision Handling: Uses open addressing with double hashing to resolve collisions.
- gcc: to compile the project
To use this hash table implementation, you can compile the provided source files and run the example program. Here are the steps:
-
Clone the repository (if not already done):
git clone https://github.com/timmythecreator/c-hash-table.git
-
Navigate to the project directory:
cd c-hash-table
-
Compile the project:
gcc -o hash main.c hash_table.c prime.c -lm
After compiling, you can run the example program that demonstrates the hash table operations:
./hash