Starting from:

$35

Homework Project 4 Solution

The aim of this homework is to implement a hash table with overflow lists, using a universal family of hash functions, the bit-xor function described in the class. The keys are supposed to be 32-bit unsigned integers, the values are integers.




 
hashtable t * create hash(int size) creates the parameters for a hash function (random choice) and allocates the hash table. The size of the created hash table is the power of two that is next larger than the given size.




 
void insert hash( hashtable t * hp, unsigned int key, int value) enters the (key, value) pair in the hash table




 
void delete hash( hashtable t * hp, unsigned int key) deletes the (key, value) pair in the hash table




 
int find hash( hashtable t * hp, unsigned int key) returns the value associated with key, if it exists, or 0 else.







Do not use code from the web, or share code with other students. Your homework submission must be your work.

More products