MCPcopy Create free account
hub / github.com/Jack-Lee-Hiter/AlgorithmsByPython / isRoot

Method isRoot

BinarySearchTree.py:22–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 return self.parent and self.parent.rightChild == self
21
22 def isRoot(self):
23 return not self.parent
24
25 def isLeaf(self):
26 return not (self.rightChild or self.leftChild)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected