MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / is_right

Method is_right

data_structures/binary_tree/red_black_tree.py:446–450  ·  view source on GitHub ↗

Returns true iff this node is the right child of its parent.

(self)

Source from the content-addressed store, hash-verified

444 return self.parent.left is self
445
446 def is_right(self) -> bool:
447 """Returns true iff this node is the right child of its parent."""
448 if self.parent is None:
449 return False
450 return self.parent.right is self
451
452 def __bool__(self) -> bool:
453 return True

Callers 2

_insert_repairMethod · 0.95
_remove_repairMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected