Advertisement
LoganBlackisle

2

Jun 16th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. package prep_33_binarysearchtrees;
  2.  
  3. import prep_33_binarysearchtrees.BST_construct.Node;
  4.  
  5. public class ConstructApp {
  6. public static void main(String[] args) {
  7. BST_construct tree = new BST_construct();
  8.  
  9. int pre[] = new int[] { 10, 5, 1, 7, 40, 50 };
  10. int size = pre.length;
  11.  
  12. Node root = tree.constructTree(pre, size);
  13.  
  14. System.out.println("Inorder traversal of the constructed tree is ");
  15.  
  16. tree.printInorder(root);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement