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

Method _push_direct

algorithms/stack/ordered_stack.py:42–48  ·  view source on GitHub ↗

Append an item without enforcing order. Args: item: The value to append.

(self, item: int)

Source from the content-addressed store, hash-verified

40 return self.items == []
41
42 def _push_direct(self, item: int) -> None:
43 """Append an item without enforcing order.
44
45 Args:
46 item: The value to append.
47 """
48 self.items.append(item)
49
50 def push(self, item: int) -> None:
51 """Push an item while maintaining sorted order.

Callers 1

pushMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected