// Allison Obourn // CSE 143 - lecture 21 // Creates a binary search tree of integers. public class IntBinarySearchTreeClient { public static void main(String[] args) { IntTreeNode root = new IntTreeNode(42); root.left = new IntTreeNode(5); root.right = new IntTreeNode(57); root.right.right = new IntTreeNode(86); // IntTree tree = new IntTree(root); IntBinarySearchTree tree = new IntBinarySearchTree(); tree.add(55); tree.add(29); tree.add(87); tree.add(-3); tree.add(42); tree.add(60); tree.add(91); // Trace in jGRASP debugger. System.out.print("Preorder: "); tree.printPreorder(); System.out.println(); System.out.print("Inorder: "); tree.printInorder(); System.out.println(); System.out.print("Postorder: "); tree.printPostorder(); System.out.println(); tree.remove(55); tree.printPreorder(); } }