Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/arnauddri/algorithms
/ Pop
Method
Pop
data-structures/stack/stack.go:33–40 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
31
}
32
33
func
(s *Stack) Pop() (el
interface
{}) {
34
s.lock.Lock()
35
defer
s.lock.Unlock()
36
37
el, s.stack = s.stack[0], s.stack[1:]
38
s.len--
39
return
40
}
41
42
func
(s *Stack) Push(el
interface
{}) {
43
s.lock.Lock()
Callers
5
TestNew
Function · 0.80
TestTopologicalSort
Function · 0.80
Scc
Function · 0.80
UndirectedDfs
Function · 0.80
DirectedDfs
Function · 0.80
Calls
no outgoing calls
Tested by
2
TestNew
Function · 0.64
TestTopologicalSort
Function · 0.64