hi, Ive written an ADD method for a binary search tree. This is only part done and looks at the leftest side of the tree. When i try to execute it, it doesnt do anything (my applet wont load to show the tree).
Greetings there, well i guess its too late for a reply, but as they say it, its never too late :-)
so, while reading your code, what seems strange is that you are reusing the root node, as a temporary node. in the check of whether the tree is empty, when the code reaches the root!=null you have used the root node as a temporary node. so rather, first use a temp node to iterate through the whole tree(not the root node!) and maybe it'll lead you some where. also your root objects class structure might also be needed to see what's in there too :-)
hope thi helps,
Namaste, i honour the spirit in you which is also in me.