You are on page 1of 1

Lab for hash table

Write the implementation for the following tasks. Note that you have to devise of a way to test all of your implementation. Use the linear probing.

struct

Node { int data; Node* next;

}; class ChainHash { public: static const int SIZE = 100; ChainHash(); // Construct an empty ChainHash. //Create a ChainHash from a file where all space separated integers are shown on the first line. ChainHash(char *filename); ~ChainHash();//Destruct the ChainHash // Search a value which exist on the ChainHash bool Search(int value) const; // Insert a value to ChainHash bool Insert(int value); // Delete a node which has data value void Delete(int value); private: Node* T[SIZE]; };

You might also like