From 676738e7cbe702b85cf11c84b526d18e5b47b503 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Mon, 13 Apr 2020 21:21:19 +0200 Subject: [PATCH] JAVA-1295: Fix node.left -> node.right --- data-structures/src/main/java/com/baeldung/tree/BinaryTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-structures/src/main/java/com/baeldung/tree/BinaryTree.java b/data-structures/src/main/java/com/baeldung/tree/BinaryTree.java index bb62714006..7469e8ba64 100644 --- a/data-structures/src/main/java/com/baeldung/tree/BinaryTree.java +++ b/data-structures/src/main/java/com/baeldung/tree/BinaryTree.java @@ -142,7 +142,7 @@ public class BinaryTree { nodes.add(node.left); } - if (node.left != null) { + if (node.right != null) { nodes.add(node.right); } }