What is the count? Is it used when debugging the code to keep the output down to a reasonable size?
Once the bug is fixed the debug count can be commented out of the source.
Type: Posts; User: Norm
What is the count? Is it used when debugging the code to keep the output down to a reasonable size?
Once the bug is fixed the debug count can be commented out of the source.
Sounds like an infinite loop. Add some printlns to show where the code is executing and what the values of the variables are as they are used. The print out will show you where the loop is.
That long name is for the case where the class is in the package: binary.search.tree
The full package.classname must be specified with the java command when trying to execute the class.
The IDE...
Use a reference to a node to get to the values in a node. For example: root.value would access value in the instance of Node referred to by toot.
Node.left is how it would be coded if left was...
Did you see this in post#8
root should be in BST not in Node
Where is the constructor for the BST class. Hint: constructors don't return void.
Most of the errors for "cannnot find symbol"...
The Node class is passive. It holds the pointers and value.
BST class has the logic for maintaining the tree and accessing the Node objects for chaining the nodes together and traversing the tree....
value should be a local variable in the main() method
main() should NOT be creating Node objects. That should be done in the BST class's insert() method.
In post#2 I said:
Create an instance...
The Node class can be an inner class in the BST class or it could be outside the BST class. It would not have to be in a separate file(unless you want it to be public).
Please post the full...
Create an instance of the class in the main() method and call some of its methods.
It looks like the definitions of the Node class and the BST class are mixed together. The Node class shouldn't...