C Program To Implement Dictionary Using Hashing Algorithms
unsigned long hash(char *str) unsigned long hash = 5381; int c; while ((c = *str++)) hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
prev = curr; curr = curr->next;
The foundation of a dictionary consists of a structure for individual entries and the table itself. This example uses with linked lists to handle collisions (when two keys hash to the same index). c program to implement dictionary using hashing algorithms
return NULL;