1. Repeat the previous exercise, but instead write recursive versions of the methods add, remove, and get Value. 2. Segment 21.20 describes the inner class Key Iterator. An instance of this class is...


1. Repeat the previous exercise, but instead write recursive versions of the methods add, remove, and get Value.


2. Segment 21.20 describes the inner class Key Iterator. An instance of this class is an iterator that traverses the search keys in the dictionary. In a similar fashion, the inner class Value Iterator provides a way to traverse the dictionary’s values. Write definitions for these two inner classes of the class SortedLinkedDictionary.


3. Define an iterator for the ADT dictionary that returns entries containing both a search key and a value. Describe the class of these entries. Implement a method getEntryIterator that returns such an iterator.

Nov 17, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here