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
What is the difference between wire and reg? Net types: (wire,tri)Physical connection between structural elements. Value assigned by a continuous assignment or a gate output.

What is Public Key Cryptography Public-key cryptography is a form of modern cryptography which permits users to communicate safely without lastly agreeing on a shared secret

Characteristics of computer storage: Storage technologies at all of levels of the storage hierarchy may be distinguished by evaluating particular core characteristics and alon

Now let's define range which a normalised mantissa can signify. Let's presume that our present representations has normalised mantissa so left most bit can't be zero so it has to b

Traffic Handling Capacity is given by (A)  Switching capacity × Theoretical maximum load (B)  Switching capacity / Theoretical maximum load (C)  Theoretical maximu

A two stage non-blocking network requires twice the number of switching elements as the single stage non-blocking network. It is true or false. Ans: It is true that a two st

Describe in brief about The internet Web sites need to be set up to maximise information supplied to customers and to ensure they are as self-contained and helpful as possible.

A communication protocol is an agreement which specifies a common language two computers use to exchange messages. For instance, a protocol specifies exact format and meaning of ev

What are Different types of Verilog Simulators? There are essentially two types of simulators available. -  Event Driven -  Cycle Based

Pruning - artificial intelligence: Recall which pruning a search space means deciding that there certain branches to should not be explored. Moreover if an agent knows for sur