image
image

Right, So you have the Hash Table. Simple Enough to explain.

So the way you store items in hash is by using a formula/cipher called a key. his case, assigning numbers to letters to calculate a new number

With that new number, he is modulating it by 10 because there is 10 spots. Modulating is like doing Eenie-Meenie-Minnie-Moe, where after you went through the set the first time, you start again until you reach the end of the song.

So with 5, 5 mod 10 = 5 because 1, 2, 3, 4, 5.

If it was 12 mod 10, it would be 2 because 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2. Counted 12 times, but started over after hitting 10

So the box is stored in slot 5.

Plus side: fast to use, store, and security measure

But con, with his key his second item could only be stored in slot 5. And since slot 5 is full, he has to use the old item first before saving the new item

Science!