Chapter 18 Questions
True or False
1. To make an intelligent choice among various possible dictionary implementations, you must
analyze the efficiency with wich each supports the dictionary operations
2. The getValue(searchKey) method for an ADT dictionary retrieves the specified search key
for a given value.
3. The client code should not be able to modify an entry’s search key once that entry is in the
dictionary.
4. An ADT dictionary should never allow duplicate search keys
5. The traverse method visits all dictionary entries.
6. A dictionary must store and form an association between search key and data value only for a
sorted version of the dictionary, not for unsorted.
7. A linear link-based implementation of the ADT dictionary does not need to shift data for an add
or a remove operation.
8. A linear link-based implementation of the ADT dictionary supports addition and removel
operations more efficiently than an array-based implementation.
9. A binary search tree implementation of the ADT dictionary is nonlinear.
10. In the ArrayDictionary class, we must sort the items each time traverse is called.
11. The binary search tree implementation of the ADT dictionary has a binary search tree as a data
member.
12. The add method for the template for TreeDictionary presented in the text does not allow
for duplicate entries.
13. It is important to know both what operations are needed for a given application of an ADT
dictionary and how often each operation is required.