We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35a088a commit df9c8a8Copy full SHA for df9c8a8
data_structures/bst/print_ancestor.py
@@ -11,7 +11,7 @@ def print_ancestor_recursive(root, key):
11
return False
12
if root.val == key:
13
return True
14
- if print_ancestor_recursive(root.left, key) || print_ancestor_recursive(root.right, key):
+ if print_ancestor_recursive(root.left, key) or print_ancestor_recursive(root.right, key):
15
return root.data
16
17
0 commit comments