public final class BinaryTreeUtility
extends java.lang.Object
Constructor and Description |
---|
BinaryTreeUtility() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
removeLeftMost(BinaryTree<T> t)
Removes and returns the left-most node in
t . |
static <T> T |
removeRightMost(BinaryTree<T> t)
Removes and returns the right-most node in
t . |
static BinaryTree<java.lang.String> |
treeFromString(java.lang.String str)
Builds a binary tree from the given string.
|
public static BinaryTree<java.lang.String> treeFromString(java.lang.String str)
str
- public static <T> T removeLeftMost(BinaryTree<T> t)
t
.T
- type of BinaryTree
nodest
- the BinaryTree
from which to remove the nodeBinaryTree
public static <T> T removeRightMost(BinaryTree<T> t)
t
.T
- type of BinaryTree
nodest
- the BinaryTree
from which to remove the nodeBinaryTree