Need an example
I need to Give the size of the table and the elements I have tried to insert, which I could not insert because of collision after the table is more than half full.
I have tried a few different inputs on the table size, with the function: h of i (x) = (hash(x) + f(i)) mod table size
f(i)= i^2
I would appreciate any help thanks.
For a table of size 7 assume the spots 0, 1, 2, 4 are taken, 3, 5, 6 are free. Now try to insert an x where hash(x) = 0.
Example: lets take hash(x) = x % 7.