Surprisingly, the Java form of a binary tree that supports deletion is more complex than the C++ version.
This software was written by Ian L. Kaplan, Chief Fat Bear, Bear Products International. Use of this software, for any purpose, is granted on two conditions:
The source code for this class is formatted for both Doxygen and JavaDoc. Doxygen is available from http://www.doxygen.org. Doxygen is available for Linux, Solaris and even Windoz. To generate documentation do:
Doxygen: doxygen doxygenBinaryTree
Javadoc: javadoc -d -private TreeTest.java BinaryTree.java
Compounds | |
class | BinaryTree |
This class supports insertion and deletion of elements in a simple binary tree (e.g., the tree is not a balanced tree like an AVL tree or a red-black tree). More... | |
class | BinaryTree.Node |
A binary tree node, where the associated data item is a generic Object. More... | |
class | BinaryTree.NodeReference |
A container for a reference. More... |