C goes to the next open value because they collide
resize
is called if the table is >= being half full.
The first 8 insertions before the resize:
Put the existing keys (they rehash), then continue putting the rest of the list
A is true B is false C is true (another case of A basically) D is false (another case of B)
For get
: best case runtime is O(1), worst case is O(n).
For resize
: avg runtime is O(m).
For put
: amortized O(1) runtime.
Load factor must be < 1 otherwise it will infinitely loop thru the table on a search miss.
We can’t simply set a key to null to delete, becauses if there are keys that hash to that index we won’t be able to find it. We start by setting the first key to null, then we have to rehash and reput the keys in the same cluster.