public static void main(String args[]) { TreeNode root = AssortedMethods.createBinarySearchTree(); System.out.println( "Inordertree traversal using Inorder Predecessor.... without using stack or queue"); treeTraversalInorder(root); System.out.println( "\nPreordertree traversal using Inorder Predecessor.... without using stack or queue"); treeTraversalPreorder(root); }
public static void main(String[] args) { int a[] = {10, 20, 30, 40, 50, 60}; AVLTreeNode root = BuildTree(a, 0, a.length - 1); System.out.println("the tree in Inorder is...."); AssortedMethods.printInorder(root); }