/example of an employee class class employee publicconst string getnameconst return namebool operator==const employee rhs const return getname=rhs getname)bool operator!=const employee rhs const return !*this =rhs/additional public members not shown privatestring namedouble salaryint seniority/additional private members not shown }template class hash publicsize_t operator()const employee item static hash hfreturn hfitem getname)}figure example of class that can be used as hashedobj of nodes to examine is on average successful search requires that about ( / links be traversed to see thisnotice that the list that is being searched contains the one node that stores the match plus zero or more other nodes the expected number of "other nodesin table of elements and lists is ( )/ /mwhich is essentially lsince is presumed large on averagehalf the "other nodesare searchedso combined with the matching nodewe obtain an average search cost of / nodes this analysis shows that the table size is not really important but the load factor is the general rule for separate chaining hashing is to make the table size about as large as the number of elements expected (in other wordslet in the code in figure if the load factor exceeds we expand the table size by calling rehash at line rehash is discussed in section it is also good ideaas mentioned beforeto keep the table size prime to ensure good distribution