Serious Question

renegadeandy

In Runtime
Messages
292
Hi guys.

Im currently trying to program a Binary tree in java.

Now - this implementation must be fully recursive. Do you think a set of N should be used for this problem?

I have been thinking about it for quite some time - other than that - all i can see if some sort of log n arithmetic.

I wondered if i could possibly even use the schlagelhoch tree balancing algorithm but this doesnt use a set of N, shoud i perhaps try using a bubblesort on a set of X instead?

Any ideas?

Thanks
 
You need to take the root, insert it into both left and right node, and then assign the whole new array to the set of N.

Then, you can perform the binary search (ie log n) on the set of N, which will give you a balanced AVL tree.

The set of X is only used when you're deleting the contents of a map, idiot :mad: Even then, it's not CPU efficient, the Bjuren-Cooper bubblesort inverse insertion algorithm is so much faster.
 
How, the Bjuren-Cooper bubblesort inverse insertion must traverse the set of n squared...

Are you sure that the set of n actually parses the integer complexity by 2 dp the stack overflow seems to represent this fairly methodically.

The set of x can be used in more than the deleting contents of a map - god what a frickin noob. I have used it more than 8 times on the linton-ionosphere cakeeater algorithm so i really dont know what you mean - it looks like this so fair

a for x = a to bjuren{

n.setof(x) +-%67.

Any ideas?
 
excuse me?

that is proper java syntax for the binary tree declaration.....
please dont insult my work if you dont know what you are talking about please dont answer.

Thanks.
 
Back
Top Bottom