Package lc.test

Class ToBinaryTree<T extends java.lang.Comparable<? super T>>


  • public class ToBinaryTree<T extends java.lang.Comparable<? super T>>
    extends java.lang.Object
    Convert 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 void main​(java.lang.String[] args)
      Tester.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.