An array of size M > number of elements N is used such that:
1. Hash - map key to i between 0 and M-1.
2. Insert - at table index i, if not free - try i+1, i+2 etc
3. Search - search table index i, if occupied and no match - try i+1, i+2 etc
Following is the implementation :
No comments:
Post a Comment