Binary Search Tree Example
There are two files to look at for this example (in addition to ConsoleReader.java)
The BST.java file includes the Binary Search Tree class, as well as the private class of TreeNode. It includes methods to insert and find nodes, traverse trees, compute height and depth, and make a copy of a tree.
The driver , which inserts randomly generated integers
into the Binary Search Tree, and later traverses it to search for an element
and find its depth, is in TreeTest.java