private void inorderPrinting(Node node) { if (node != null) { inorderPrinting(node.getLeft()); System.out.print(node.getData() + " "); inorderPrinting(node.getRight()); } }
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(); }
public void inorderPrinting() { inorderPrinting(root); }