I am trying to implement a generic HashTable. (This question is in continuation to the question asked here)
I have implemented the generic hash function for the case when the size of the table is fixed. But, in real time situations, it's a pretty bad idea to use a HashTable whose size is initially fixed to about the 2^32 bits since it might lead to a lot of memory wastage.
So, what I am now trying to do is to dynamically increase the size of the hast table, from some initial value, whenever it's full.
But, when I do this the hash function will now return new values to the the previously hashed keys.
Is there any way to overcome this problem other than re-hashing the values previously hashed values with the new ones.