Suppose keys 16,32,40,48,56,72 must be inserted into a hash table with 10 slots can anyone create a hash function in key = 16, 32, 40, 48, 46, 72
example 16 if I calculate with this function
16 * 2 = 32 % 10 = 2 || 32*2 = 64 % 10 = 4|| 40 * 2 = 80 % 10 = 0 || 46 * 2 = 92 % 2 = 9 || 96 % 10 = 6 72 * 2 = 144 % 10 = 4 > this is a collisions if any one know any method
[40] [ ] [16] [ ] [32] [ ] [48] [ ] [ ] [46]
i have try function
- h(k*2)%10
- h(2*k-3)%10
any idea.