For example, when a new <key,value> pair is inserted into the hash table, it is necessary to checkthat the key is not already present. If the linked list associated with a bucket is sorted, the search can becurtailed once either the key is found or the key in the linked list is greater than the key to be inserted.Hence, it is not always necessary to traverse the entire linked list.

icon
Related questions
Question

For example, when a new <key,value> pair is inserted into the hash table, it is necessary to check
that the key is not already present. If the linked list associated with a bucket is sorted, the search can be
curtailed once either the key is found or the key in the linked list is greater than the key to be inserted.
Hence, it is not always necessary to traverse the entire linked list. 

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer