BinarySearchTree class. Available member functions include default constructor, insert, traverse and height.
More...
|
| enum | order { PRE,
IN,
POST
} |
| | types of traversals
|
| |
BinarySearchTree class. Available member functions include default constructor, insert, traverse and height.
◆ height()
Calculate height of the tree.
- Parameters
-
- Returns
- ll
◆ insert()
| void BinarySearchTree::insert |
( |
ll |
val | ) |
|
|
inline |
Insert an element into the tree.
- Parameters
-
| [in] | val | value to be inserted |
◆ traverse()
Traverse the tree.
- Parameters
-
| [in] | T | tree root pointer |
| tt | type of traversal |
The documentation for this class was generated from the following file: