From: Jérôme Benoit Date: Sat, 10 Feb 2018 19:06:09 +0000 (+0100) Subject: Code cleanup. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=dd16cbd60794f33058221497c7b2f4007c0cc1d2;p=TP_POO.git Code cleanup. Signed-off-by: Jérôme Benoit --- diff --git a/Arbres/ArbreBinaire.java b/Arbres/ArbreBinaire.java index 78dc4b8..ee0f27b 100644 --- a/Arbres/ArbreBinaire.java +++ b/Arbres/ArbreBinaire.java @@ -147,11 +147,9 @@ public class ArbreBinaire { } private void afficher_arbre_rec(IntNode currentNode, int column) { - int i; - if (currentNode != null) { afficher_arbre_rec(currentNode.getRightNode(), column + 1); - for (i = 0; i < column; i++) { + for (int i = 0; i < column; i++) { System.out.print(" "); } System.out.println(currentNode.getData()); @@ -192,6 +190,8 @@ public class ArbreBinaire { bTree.inserer(9); bTree.inserer(11); bTree.inserer(10); + bTree.inserer(8); + bTree.inserer(4); bTree.afficher(); bTree.afficher_arbre();