diff --git a/data_structure/BinaryTree.py b/data_structure/BinaryTree.py index 1c70276..b486639 100644 --- a/data_structure/BinaryTree.py +++ b/data_structure/BinaryTree.py @@ -121,7 +121,11 @@ def __remove(self, parent, cur, item): else: cur.val = self.__most_left_val_from_right_node(cur.right).val self.__removeitem(cur, cur.right, cur.val) - + else: + if cur.val > item: + self.__remove(cur, cur.left, item) + else: + self.__remove(cur, cur.right, item) def __most_left_val_from_right_node(self, cur): if cur.left is None: