Question: The BSTDictionary class on moodle has a method range with the following declaration: public Iterable range(K a, K b) Passed a low key value a

The BSTDictionary class on moodle has a method range with the following declaration:

public Iterable range(K a, K b)

Passed a low key value a and a high key value b, range should return an ArrayList that contains all the dictionary values with key between a and b, inclusive, in order. The range method relies on the rangehelp method, which is not fully implemented. Complete the definition of rangehelp. Use the program PrintRange.java to test your method. It reads in the shuffled cmu pronunciation dictionary and creates a dictionary keyed on word. The program reads two strings from the terminal, and prints out all records with keys that fall between the two given strings, inclusive. Your range method should visit as few nodes in the BST as possible.

For example, with input DOFF DOG

PrintRange should produce the output

DOFF D AO1 F

DOFFING D AO1 F IH0 NG

DOFFS D AO1 F S

DOG D AO1 G

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!