How are hash table's values stored physically in memory?
The entries of a hash table are stored in an array. However, you have misunderstood the application of the modulo operator to the hash values. If the hash table is stored in an array of size&nbsp;$n$, then the hash function is computed modulo&nbsp;$n$, regardless of how many items are currently stored in the table.  So, in your example, if you were storing the items in an array of size&nbsp;6, the three items with hash values 0, 10 and&nbsp;20 would be stored at locations 0, 4 and&nbsp;2, respectively.  If you added a fourth element with hash value, say, 31, that would be stored at location&nbsp;1, without needing to move any of the first three items.  If your hash table was becoming full and you wanted to move it into a bigger array, then you would need to recalculate the locations of all the items in the table and move them appropriately.