Package lc.test
Class ToBinaryTree<T extends java.lang.Comparable<? super T>>
- java.lang.Object
-
- lc.test.ToBinaryTree<T>
-
public class ToBinaryTree<T extends java.lang.Comparable<? super T>> extends java.lang.ObjectConvert the input string to a binary tree.
-
-
Constructor Summary
Constructors Constructor Description ToBinaryTree(T[] input)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeNode<T>binaryTree()Convert the input string a binary tree which has integer values.static voidmain(java.lang.String[] args)Tester.
-
-
-
Constructor Detail
-
ToBinaryTree
public ToBinaryTree(T[] input)
-
-
Method Detail
-
binaryTree
public TreeNode<T> binaryTree()
Convert the input string a binary tree which has integer values.- Parameters:
input- the input string.- Returns:
- the root of the binary tree.
-
main
public static void main(java.lang.String[] args)
Tester.- Parameters:
args- Commnad line arguments.
-
-