Java course evaluation assignment about binary search trees

I have a course evaluation assignment about binary search trees and idk how to do it?

That assignment is a combination of red-black trees and binary search trees in general and is until sunday at midnight,if anyone can help me somehow with the implementation and test or give me some hints how to do something, at least some simple program.

Here it is what it says:

Your solution of this assignment must be handed in before Sunday 23-Oct-

2011 at 23:59. It will be a part of the evaluation of the course. If you fail

this assignment you will fail the course.

The assignment is individual. Similar solutions from different persons will not

be accepted.

In this assignment you have to design and implement a “Hit Balanced Tree”

(HBT). HBT is a new data structure invented for this assignment and it might

not be of any use in real programs.

An HBT is an ordinary binary search tree where all the nodes contain an

extra attribute – number of hits. When a node is created the hit count is set

to zero. Every time the node is found with the find(), contains() etc.

methods its hit count is incremented by one.

When an HBT is balanced, all the descendants of a node have lower hit count

than the node itself. On the other hand, it is still a search tree, where all

nodes in the left subtree of node have elements smaller than the element of

the node, and corresponding greater than for the right subtree.

In other words: the root will be the node with the highest hit count. To the

left are the smaller elements and the larger element are to the right. This

rule is applied recursively down both the subtrees.

Implement an HBT and make a proper test of your implementation.

pls i need some help, i would be really gratefull :D :D if it's possible something simple without generics and exceptions, HEEEEELP

Re: Java course evaluation assignment about binary search trees

Re: Java course evaluation assignment about binary search trees

Quote:

Originally Posted by

**doWhile**

will i find answer if i leave the question as it it now??