stored in the tablewe can easily create table large enough to hold the entire collection in many instanceshoweverthere is no way to know up front how many keys will be stored in the hash table in this casewe can start with table of some given size and then grow or expand the table as needed to make room for more entries we used similar approach with vector when all available slots in the underlying array had been consumeda new larger array was created and the contents of the vector copied to the new array with hash tablewe create new array larger than the originalbut we cannot simply copy the contents from the old array to the new one insteadwe have to rebuild or rehash the entire table by adding each key to the new array as if it were new key being added for the first time rememberthe search keys were added to the hash table based on the result of the hash function and the result of the function is based on the size of the table if we increase the size of the tablethe function will return different hash values and the keys may be stored in different entries than in the original table for examplesuppose we create hash table of size and insert our set of sample keys using simple linear probe with applying the hash function to the keys yields the following resultswhich includes single collisionh( = ( = ( = ( = = ( = ( = ( = ( = the original hash table using linear probe is shown in figure (aand the new larger hash table is shown in figure (byou will notice the keys are stored in different locations due to the larger table size ( ( figure the result of enlarging the hash table from elements to as the table becomes more fullthe more likely it is that collisions will occur experience has shown that hashing works best when the table is no more than approximately three quarters full thusif the hash table is to be expandedit should be done before the table becomes full the ratio between the number of keys in the hash table and the size of the table is called the load factor in practicea hash table should be expanded before the load factor reaches the amount by which the table should be expanded can depend on the applicationbut good rule of thumb is to at least double its size as we indicated earlier