The "how to implement a hash table" article <a href="https://benhoyt.com/writings/hash-table-in-c/" rel="nofollow">https://benhoyt.com/writings/hash-table-in-c/ was really helpful for me. I thought that hash tables were something that were basically impossible to make in C, but this showed that it was simpler.
IIRC, the first edition of the book "The C Programming Language" (aka K&R), by Kernighan and Ritchie, had a simple example of how to create a hash table in C, including with buckets to handle collisions. It was a simple algorithm. It simply added up the ASCII values of all the characters in the key, modulo some number.
ancientstraits · · focus · HN ↗
fuzztester · · focus · HN ↗