previous |
start |
next
Algorithm for Finding an Object x in a Hash Table
- Get the index h into the hash table
- Compute the hash code.
- Reduce it modulo the table size
- Iterate through the elements of the bucket at position h
- For each element of the bucket, check whether it is equal to
x
- If a match is found among the elements of that bucket, then x
is in the set.
- Otherwise, x is not in the set
previous |
start |
next