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

Method __len__

data_structures/binary_tree/floor_and_ceiling.py:32–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 yield from self.right
31
32 def __len__(self) -> int:
33 return sum(1 for _ in self)
34
35
36def floor_ceiling(root: Node | None, key: int) -> tuple[int | None, int | None]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected