| CS 1371 Dept. Presents: |
Class BinaryTree
| Method Summary | |
|---|---|
| BinaryTree (data) Constructor that creates a binary tree |
|
The string representation of the BinaryTree |
|
| display ( )
Command window display of a BinaryTree |
|
| BFFind ( bt, data )
Finds the node containing data from the binarytree bt using a Breadth First Search |
|
|
BFTString ( data ) Tree traversal including formatting lines |
|
|
count ( ) Counts the number of nodes in the binarytree bt |
|
| DFFind (bt, data) Finds the node containing data from the binarytree bt using a Depth First Search |
|
| getroot ( ) Gets the root of the BinaryTree. |
|
| setroot ( ) Sets the root of the BinaryTree |
|
| inOrder2List ( ) Recursively does in-order processing. |
|
| inOrderString ( ) The string representation of the inOrder2List method |
|
| largest ( )
Finds the largest node in the BinaryTree |
|
| preOrder2List ( ) Recursive does in-order processing. |
|
| preOrderString ( ) The string representation of the preOrderString method |
|
| Method Detail |
|---|
bt = BinaryTree( data ) creates a BinaryTree object
If Data is another object of class BinaryTree, it will be added to its root.
bt = BinaryTree ( ) will create an empty binarytree
BFFind (bt, data) finds a node containing data from the binarytree bt