A data structure that is unable to contain data is a sad sight indeed. We need to put together all the other steps we’ve taken: plug the key into the hash function, plug the hash code into the compression function, use the array index to find the place in the array, and finally set the value of the array to the value we want.
.assign() method for the hash map. It should take three parameters:
Save the value (just the value for now) to the map’s
array at the index determined by plugging the
key into the
.hash() method and plugging the hash code into the