Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. /* a bucket is a linked list, each of whose entries contains a string and its hash */
  2.  
  3. typedef struct bucket bucket;
  4. struct bucket {
  5. char *string;
  6. unsigned long int hash;
  7. bucket *next;
  8. };
  9. /* By convention, the empty bucket is NULL. */
  10.  
  11. typedef struct hash_table htbl;
  12. struct hash_table {
  13. unsigned long int(*hash)(char*);
  14. bucket **buckets; /* an array of buckets */
  15. unsigned int n_buckets;
  16. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement