From dd16cbd60794f33058221497c7b2f4007c0cc1d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 10 Feb 2018 20:06:09 +0100 Subject: [PATCH] Code cleanup. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- Arbres/ArbreBinaire.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.34.1