An empty table of 11 slots. Each key goes to slot key mod 11, and when that slot is taken it walks to the next free one.
An empty hash table with 11 slots. Keys will be inserted using key modulo 11, walking forward on a collision.
Next key: 12.
Moving on to key 12.
Insert 12. Its hash is 12 mod 11, which is slot 1.
Insert key 12. The hash of 12 is 1, so slot 1 is where the search starts.
Slot 1 is empty, so 12 goes here.
Probing slot 1, which holds empty. It is free.
12 is stored in slot 1.
Key 12 is now stored in slot 1.
Next key: 23.
Moving on to key 23.
Insert 23. Its hash is 23 mod 11, which is slot 1.
Insert key 23. The hash of 23 is 1, so slot 1 is where the search starts.
Slot 1 holds 12, not 23. Walk on to slot 2.
Probing slot 1, which holds 12. It does not match, so the probe moves on.
Slot 2 is empty, so 23 goes here.
Probing slot 2, which holds empty. It is free.
23 is stored in slot 2.
Key 23 is now stored in slot 2.
Next key: 1.
Moving on to key 1.
Insert 1. Its hash is 1 mod 11, which is slot 1.
Insert key 1. The hash of 1 is 1, so slot 1 is where the search starts.
Slot 1 holds 12, not 1. Walk on to slot 2.
Probing slot 1, which holds 12. It does not match, so the probe moves on.
Slot 2 holds 23, not 1. Walk on to slot 3.
Probing slot 2, which holds 23. It does not match, so the probe moves on.
Slot 3 is empty, so 1 goes here.
Probing slot 3, which holds empty. It is free.
1 is stored in slot 3.
Key 1 is now stored in slot 3.
Next key: 34.
Moving on to key 34.
Insert 34. Its hash is 34 mod 11, which is slot 1.
Insert key 34. The hash of 34 is 1, so slot 1 is where the search starts.
Slot 1 holds 12, not 34. Walk on to slot 2.
Probing slot 1, which holds 12. It does not match, so the probe moves on.
Slot 2 holds 23, not 34. Walk on to slot 3.
Probing slot 2, which holds 23. It does not match, so the probe moves on.
Slot 3 holds 1, not 34. Walk on to slot 4.
Probing slot 3, which holds 1. It does not match, so the probe moves on.
Slot 4 is empty, so 34 goes here.
Probing slot 4, which holds empty. It is free.
34 is stored in slot 4.
Key 34 is now stored in slot 4.
Next key: 45.
Moving on to key 45.
Insert 45. Its hash is 45 mod 11, which is slot 1.
Insert key 45. The hash of 45 is 1, so slot 1 is where the search starts.
Slot 1 holds 12, not 45. Walk on to slot 2.
Probing slot 1, which holds 12. It does not match, so the probe moves on.
Slot 2 holds 23, not 45. Walk on to slot 3.
Probing slot 2, which holds 23. It does not match, so the probe moves on.
Slot 3 holds 1, not 45. Walk on to slot 4.
Probing slot 3, which holds 1. It does not match, so the probe moves on.
Slot 4 holds 34, not 45. Walk on to slot 5.
Probing slot 4, which holds 34. It does not match, so the probe moves on.
Slot 5 is empty, so 45 goes here.
Probing slot 5, which holds empty. It is free.
45 is stored in slot 5.
Key 45 is now stored in slot 5.
5 keys in 11 slots, after 10 collisions. The fuller a table gets, the more it collides.
The table holds 5 keys in 11 slots after 10 collisions.