1. Project 10 in Chapter 21 revised the class Entry, which is in Listing 21-1, to make it public, and then used it in an implementation of a dictionary. Consider a hash table of Entry objects. Without further changes to the definition of Entry, how could you indicate a removed entry?
2. Suppose that the size of your hash table is 31, that you use the hash code described in Segment 22.8, and that you use separate chaining to resolve collisions. List five different names that would hash to the same element in the table.
3. Assume the hash table and hash function described in Exercise 4, but use open addressing with linear probing to resolve collisions. List five different names that do not all hash to the same element in the table yet would nonetheless result in collisions and clustering.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here