Hi I am having trouble wrapping my head around on how to empty my buckets.
Thanks in advance.Code:struct hashLink { KeyT key; /*the key is what you use to look up a hashLink*/ ValueT value; /*the value stored with the hashLink, an int*/ struct hashLink * next; /* linked list nodes*/ }; typedef struct hashLink hashLink; struct hashMap { hashLink ** table; /*array of pointers to hashLinks*/ int tableSize; /* number of buckets in table*/ int count; /*number of hashLinks in table*/ }; /* Other functions to insert, remove, the initialize the hash, etc. */ int cleanBuckets(struct hashMap *hasht) { /* what I'm trying to do here is return the amount of empty or clean buckets in the table, where the buckets have no links */ }



LinkBack URL
About LinkBacks




