We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 932bae0 commit 9aa9115Copy full SHA for 9aa9115
trees/binary-search-tree.py
@@ -25,9 +25,13 @@ def has_parent(self) -> bool:
25
return self.parent is not None
26
27
def is_left_child(self) -> bool:
28
+ if self.parent is None:
29
+ return False
30
return self.parent.left == self
31
32
def is_right_child(self) -> bool:
33
34
35
return self.parent.right == self
36
37
def find_min(self):
0 commit comments