mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Fixes black failures from Previous PR (#1751)
* Fixes black failures from Previous PR * Fixes equality testing alert * Fixes call to main() alert * Fixes unused import
This commit is contained in:
@ -56,13 +56,13 @@ class BinarySearchTree:
|
||||
parent_node = self.root # from root
|
||||
while True: # While we don't get to a leaf
|
||||
if value < parent_node.value: # We go left
|
||||
if parent_node.left == None:
|
||||
if parent_node.left is None:
|
||||
parent_node.left = new_node # We insert the new node in a leaf
|
||||
break
|
||||
else:
|
||||
parent_node = parent_node.left
|
||||
else:
|
||||
if parent_node.right == None:
|
||||
if parent_node.right is None:
|
||||
parent_node.right = new_node
|
||||
break
|
||||
else:
|
||||
|
Reference in New Issue
Block a user