Binary search tree, Computer Engineering

Given the following interface

public interface WordSet extends Iterable {

public void add(Word word); // Add word if not already added

public boolean contains(Word word); // Return true if word contained

public int size(); // Return current set size

public String toString(); // Print contained words
}

Implement the interface using

Hashing

Binary Search Tree

In the case of hashing, a rehash shall be performed when the number of inserted elements equals the number of buckets. For the binary search tree, the elements shall be sorted using the method compareTo. The names of the two implementations shall be HashWordSet and TreeWordSet. Note: In this task you are not allowed to use any prede ned classes from the Java library.

Posted Date: 3/14/2013 6:27:11 AM | Location : United States







Related Discussions:- Binary search tree, Assignment Help, Ask Question on Binary search tree, Get Answer, Expert's Help, Binary search tree Discussions

Write discussion on Binary search tree
Your posts are moderated
Related Questions

Q. What is interrupt? How it is useful in controlling I/O operations. Q. Explain function of Color Graphics Adopter card and Diskette Drive Adopter Card.

From the early AI pioneering stage the research emphasis has been on developing machines with intelligent behaviour. Machine intelligence however is hard to achieve. Some

Describe queue? Ans:  It is a type of data structure in which the data are stored in and retrieved on a First in first out (FIFO) basis. It grows in the direction of increasin

you will implement a second-order low-pass filter using the finite difference method. The finite difference method is a useful mathematical method that is used to numerically solve

How can you provide an alternating color scheme in a Repeater control?  AlternatingItemTemplate Like the ItemTemplate element, but rendered for every otherrow (alternating item


The desired daily output for an assembly line is 360 units. This assembly line will operate 450 minutes per day. The following table have information on this product's task times a


Draw the state diagram of a process from its creation to termination, including all transitions, and briefly elaborate every state and every transition. When a process executes