Skip to content

BST and RSA doctest #8693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 15, 2023
Prev Previous commit
Update data_structures/binary_tree/binary_search_tree.py
  • Loading branch information
tianyizheng02 authored Aug 15, 2023
commit 82126901987f81e5300d57ea962e4555b0628dfb
4 changes: 2 additions & 2 deletions data_structures/binary_tree/binary_search_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def __repr__(self) -> str:
return pformat({f"{self.value}": (self.left, self.right)}, indent=1)

@property
def is_right(self):
return self.parent and self is self.parent.right
def is_right(self) -> bool:
return self.parent is not None and self is self.parent.right


class BinarySearchTree:
Expand Down