Exercise 11.3-1

Suppose we wish to search a linked list of length \(n\), where each element contains a key \(k\) along with a hash value \(h(k)\). Each key is a long character string. How might we take advantage of the hash values when searching the list for an element with a given key?

Since the list contains both the key and the hashed value of that key, we can consult the list’s hashed values instead of the key values. This would save us time proportional to the difference between character string lengths of hashed and unhashed key values.