Problem

To simplify the telephone directory problem of Segment 19.7, we assumed that the text file...

To simplify the telephone directory problem of Segment 19.7, we assumed that the text file contained distinct names. Remove this assumption, with and without a secondary search key. (See Exercise.)

The ADT dictionary that we discussed in this chapter assumes distinct search keys. Revise the specifications of the dictionary to remove this restriction. Consider each of the following possibilities:

a. The method add adds an entry whose search key is already in the dictionary but whose value is not. The remove method deletes all entries with a given search key. The method getValue retrieves all values associated with a given search key.


b. The methods behave as Part a describes, but a secondary search key enables remove and getValue to delete or retrieve a single entry.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 19
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT