Inserted Numbers: 53,32,43,51,99 Collision Resolution : Open Addressing by default Linear Probing
Hash Function: Mod 7
Index for 53: 53%7 = 4
Index for 32: 32%7 = 4 but already 53 is there hence Probe next i.e 5 Yes available So,5
Index for 43: 43%7 = 1
Index for 51: 51%7 = 2
Index for 99: 99%7 = 1 but 43 is there hence Probe next i.e 2 but that also not available So next i.e 3 Yes available
.
6 |
|
5 |
32 |
4 |
53 |
3 |
99 |
2 |
51 |
1 |
43 |
0 |
|
Content of Array[0...6] = EMPTY,43,51,99,53,32,EMPTY