Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/Jack-Lee-Hiter/AlgorithmsByPython
/ peek
Method
peek
Stack.py:17–18 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
15
return
self.items.pop()
16
# 返回栈顶元素
17
def
peek(self):
18
return
self.items[len(self.items)-1]
19
# 判断栈的大小
20
def
size(self):
21
return
len(self.items)
Callers
1
infixToPostfix
Function · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected