update: traverse InOrder

This commit is contained in:
Sobottasgithub
2026-02-22 23:02:53 +01:00
parent 1a022f6584
commit 6e1a082333
2 changed files with 18 additions and 1 deletions

View File

@@ -25,6 +25,12 @@ public class Main {
// binaryTree.remove(72);
// binaryTree.remove(42);
System.out.println("------ TRAVERSE ------");
System.out.print(" [Post Order]:");
binaryTree.traversePostOrder(binaryTree.getRoot());
}
System.out.print("\n [Pre Order]: ");
binaryTree.traversePreOrder(binaryTree.getRoot());
System.out.print("\n [In Order]: ");
binaryTree.traverseInOrder(binaryTree.getRoot());
}
}