Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package prep_33_binarysearchtrees;
- import prep_33_binarysearchtrees.BST_construct.Node;
- public class ConstructApp {
- public static void main(String[] args) {
- BST_construct tree = new BST_construct();
- int pre[] = new int[] { 10, 5, 1, 7, 40, 50 };
- int size = pre.length;
- Node root = tree.constructTree(pre, size);
- System.out.println("Inorder traversal of the constructed tree is ");
- tree.printInorder(root);
- }
- }
Add Comment
Please, Sign In to add comment