1 parent 9e84343 commit 62651e1Copy full SHA for 62651e1
1 file changed
pygorithm/data_structures/tree.py
@@ -157,7 +157,7 @@ def min_val_bst_node(self, BSTNode):
157
def delete(self, data):
158
''' For deleting the BSTNode '''
159
if self is None:
160
- return root
+ return None
161
162
# if current BSTNode's data is less than that of root BSTNode, then only search in left subtree else right subtree
163
if data < self.data:
0 commit comments