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

Method is_full

data_structures/binary_tree/basic_binary_tree.py:23–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 return sum(1 for _ in self)
22
23 def is_full(self) -> bool:
24 if not self or (not self.left and not self.right):
25 return True
26 if self.left and self.right:
27 return self.left.is_full() and self.right.is_full()
28 return False
29
30
31@dataclass

Callers 1

is_fullMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected