Created by Ann-Kathrine Buchmakowsky
over 4 years ago
|
||
Pre-Order: public void preOrder(BinaryTree b) { System.out.println(b.getContent()); if (b.getLeftTree != null) { preOrder(b.getLeftTree()); } if (b.getRightTree != null) { preOrder(b.getRightTree()); } }
In-Order: public void inOrder(BinaryTree b) { if (b.getLeftTree != null) { inOrder(b.getLeftTree()); } System.out.println(b.getContent()); if (b.getRightTree != null) { inOrder(b.getRightTree()); } }
Post-Order: public void postOrder(BinaryTree b) { if (b.getLeftTree != null) { postOrder(b.getLeftTree()); } if (b.getRightTree != null) { postOrder(b.getRightTree()); } System.out.println(b.getContent()); }
Algorithmus von Kruskal:
Algorithmus von Prim:
Dijkstra-Algorithmus (Pseudo minimaler Spannbaum)
Want to create your own Notes for free with GoConqr? Learn more.