binary_search_tree
Description
In this implementation, each node of the binary tree contains only one valuable value. To order the nodes, the elements must implement the Ord
trait.
Usage
As a library
extern crate binary_search_tree;
use BinarySearchTree;
Features & capabilities
The BinarySearchTree struct provides the following methods:
- Viewing the root element
- Is the tree empty
- Insertion
- Insertion without duplicating
- Check for the presence of an element in the tree
- Viewing the minimum
- Viewing the maximum
- Extracting the minimum
- Extracting the maximum
- Deleting an arbitrary value
- Successor
- Predecessor
- Viewing the number of items in the tree
- Clearing the tree
- Viewing values in the tree in ascending order
- Moving the tree to a sorted vector
- Creating a tree with elements from an iterator
- Extending the tree with elements from the iterator
- Inorder traversal
- Reverse order traversal
- Preorder traversal
- Postorder traversal
- Level order traversal
If you have any comments or suggestions, or you suddenly found an error, please write to prototyperailgun@gmail.com.