MCPcopy
hub / github.com/keon/algorithms / size

Method size

algorithms/stack/ordered_stack.py:87–93  ·  view source on GitHub ↗

Return the number of elements in the stack. Returns: The stack size.

(self)

Source from the content-addressed store, hash-verified

85 return self.items[len(self.items) - 1]
86
87 def size(self) -> int:
88 """Return the number of elements in the stack.
89
90 Returns:
91 The stack size.
92 """
93 return len(self.items)

Callers 1

test_ordered_stackMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_ordered_stackMethod · 0.76