https://github.com/bitwit/hash-table-c
A basic hash table in C
https://github.com/bitwit/hash-table-c
Last synced: about 1 year ago
JSON representation
A basic hash table in C
- Host: GitHub
- URL: https://github.com/bitwit/hash-table-c
- Owner: bitwit
- Created: 2015-08-24T02:00:46.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-24T02:16:03.000Z (over 10 years ago)
- Last Synced: 2025-03-24T03:37:42.428Z (about 1 year ago)
- Language: C
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hash Table Implementation in C
Notes:
- This hash table is designed for storing `(char*)key`, `(char*)value` pairs
- Uses an FNV1-a hashing algorithm. Based on [this discussion](http://programmers.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed) it appears that FNV1-a has the most uniform distribution.
- This hash table uses a chaining method to handle collisions.
- Compiling and running this code will execute a small series of proofs with 2 hash tables. The first a hash table, sized for 100 items with no collisions and second a hash table sized to 1 item, where every entry will collide and form a linked list. The same series of assertions pass under both conditions. Additional information about the process and results are also printed to output.