if a hash table's array is resized to reduce collisions, what must be done to the existing values already in the table? if a hash table's array is resized to reduce collisions, what must be done to the existing values already in the table? all items must be copied over to the same indices in the new array. all n items must be copied over to fill the first n elements of the new array.

Respuesta :

selecting a new hashing algorithm to account for the expanded size, generating a hash table of the new size, iterating through the components of the previous table, and adding them to the new table.

How does a Hashtable resize?

The predicted number of collisions will be cut in half by doubling the table's size. The latter tactic results in a significant attribute of hash tables that we have not observed in any other data structure.

A particular linked list must contain the element you want to store in the hash table. In the event of a collision (i.e., when two distinct elements share the same hash value), both elements should be stored in the same linked list.

A hash table can be resized by selecting a new hash function to map to the new size, establishing a hash table of the new size, iterating through the components of the old table, and then inserting them into the new table.

To learn more about hash table refer to:

https://brainly.com/question/29510384

#SPJ4