Binary Tree Implementation in
- Python3
- Java
- C++
Binary-tree implementation
Class | Description |
---|---|
Node | This is a Node in the tree structure. |
BinaryTree | This is the tree class. |
- insert : Inserts the value in the tree.
- search : Searchs a given value.
- delete : Deletes a value from the tree.
- preorder : Visit the parent first and then left and right children.
- postorder : Visit left child, then the right child and then the parent.
- inorder : Visit the left child, then the parent and the right child.
- display : Displays the tree.
- predecessor : Returns the node predecessor to the given node.
- isLeaf : Checks if the given node is a leaf.