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

Method __len__

sorts/tree_sort.py:26–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 yield from self.right
25
26 def __len__(self) -> int:
27 return sum(1 for _ in self)
28
29 def insert(self, val: int) -> None:
30 if val < self.val:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected