Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/wangzheng0822/algo
/ pop
Method
pop
javascript/08_stack/StackBasedOnLinkedList.js:27–34 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
25
}
26
}
27
pop() {
28
if
(this.top === null) {
29
return
-1
30
}
31
const
value = this.top.element
32
this.top = this.top.next
33
return
value
34
}
35
// 为了实现浏览器前进后退
36
clear() {
37
this.top = null
Callers
4
StackBasedOnLinkedList.js
File · 0.45
back
Method · 0.45
front
Method · 0.45
getMax
Method · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected