Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/keon/algorithms
/ _expand
Method
_expand
algorithms/data_structures/stack.py:124–126 ·
view source on GitHub ↗
Double the size of the underlying array.
(self)
Source
from the content-addressed store, hash-verified
122
return
self._array[self._top]
123
124
def
_expand(self) -> None:
125
""
"Double the size of the underlying array."
""
126
self._array += [None] * len(self._array)
127
128
129
class
StackNode:
Callers
1
push
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected