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 Master Clock Signal in Control Unit? The Master Clock Signal: This signal causes micro-operations to be executed in a square. In a single clock cycle either a single

Write the Add/subtract rule for floating point numbers. Ans: a. Select the number with the smaller exponent and shift its mantissa right a number of steps equal to the differe

Does it makes sense for two domain name servers to contain exactly the same set of names? Why? Yes. This is very advantageous for two domain servers having similar set of names

Generic Techniques Developed: In the pursuit of solutions to various problems in the above categories, various individual fundamental techniques have sprung up which have been

Determine the simulation factor- Weather Illustration of simulation is predicting weather (i.e. a weather forecaster). In this case we will consider what/how data is collected,

What are the functions of dispatcher? There are four fuctions of dispatcher:- A)  Equal distribution of transaction load to the work processes.  B) Management of buffer a

Q. How are the instructions executed and interpreted? All computers have a Unit which performs arithmetic and logical functions. This Unit is called as Arithmetic and Logic Uni

a. Explain the Programming Paradigm? Discuss four major programming paradigms. b. State the three basic logic operators available in C++? Write a small program in C++ that uses

differentiate between multitasking and multithreading in java

What are the Rules of Timescale directive Rules -  'Timescale directive, like all compiler directives, affects all modules compiled after directive,  whether  in  same  fi