예제 #1
0
 private void inorderPrinting(Node node) {
   if (node != null) {
     inorderPrinting(node.getLeft());
     System.out.print(node.getData() + " ");
     inorderPrinting(node.getRight());
   }
 }
예제 #2
0
 public static void main(String[] args) {
   AVLTree trees = new AVLTree();
   trees.insert(9);
   trees.insert(8);
   trees.insert(7);
   trees.insert(6);
   trees.insert(5);
   trees.insert(4);
   trees.insert(3);
   trees.insert(2);
   // trees.insert(1);
   trees.printTree();
   trees.inorderPrinting();
 }
예제 #3
0
 public void inorderPrinting() {
   inorderPrinting(root);
 }