now it is quite easy to go from any number (rather than stringto number from to for examplewe can take the remainder the number leaves when divided by this is the or java modulus operation so our hash function is ( ( )% % this modulo operationand modular arithmetic more generallyare widely used when constructing good hash functions as simple example of hash table in operationassume that we now wish to insert the following three-letter airport acronyms as keys (in this orderinto our hash tablephlorygcmhkgglaaklfralaxdca to make this easierit is good idea to start by listing the values the hash function takes for each of the keyscode ( phl ory gcm hkg gla akl fra lax dca it is clear already that we will have hash collisions to deal with we naturally start off with an empty table of the required sizei clearly we have to be able to tell whether particular location in the array is still emptyor whether it has already been filled we can assume that there is unique key or entry (which is never associated with recordwhich denotes that the position has not been filled yet howeverfor claritythis key will not appear in the pictures we use now we can begin inserting the keys in order the number associated with the first item phl is so we place it at index givingphl next is orywhich gives us the number so we getphl ory then we have gcmwith value givingphl gcm ory then hkgwhich also has value results in our first collision since the corresponding position has already been filled with phl now we couldof coursetry to deal with this by simply saying the table is fullbut this gives such poor performance (due to the frequency with which collisions occurthat it is unacceptable strategies for dealing with collisions we now look at three standard approachesof increasing complexityfor dealing with hash collisions