write-a-hash-table icon indicating copy to clipboard operation
write-a-hash-table copied to clipboard

✏️ Learn how to write a hash table in C

Results 27 write-a-hash-table issues
Sort by recently updated
recently updated
newest added

`ht_get_hash` returns the same slot subsequently up to very high attempts in some cases. Example: ``` (gdb) p ht_get_hash("mybrujmaonutk", 211, 0) $32 = 38 (gdb) p ht_get_hash("mybrujmaonutk", 211, 1) $33...

It's been discussed in several other issue threads. But folks like me doesn't pay attention. Perhaps this will get your attention. There's a bug in double hash calculation. Pay attention...

### What are the values for HT_PRIME_1 and HT_PRIME_2? I used the following: ```c #define HT_INITIAL_BASE_SIZE 53 #define HT_PRIME_1 163 #define HT_PRIME_2 157 ``` ### #24 Hash function computing not...

Just a few things that tripped me up while following along: The functions ht_new and ht_del_hash_table are used in main.c but aren’t declared in hash_table.h. This causes an “implicit declaration”...

- **Fix incomplete sentence** - **fill-paragraph** Hi @jamesroutley , I really admire your work on this project! I noticed there are some pending pull requests—reviewing them could give new life...

Author has written ht_del_hash_table function as below. ``` void ht_del_hash_table(ht_hash_table* ht) { for (int i = 0; i < ht->size; i++) { ht_item* item = ht->items[i]; if (item != NULL)...