Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/arnauddri/algorithms
/ isEmpty
Method
isEmpty
data-structures/stack/stack.go:26–31 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
24
}
25
26
func
(s *Stack) isEmpty() bool {
27
s.lock.Lock()
28
defer
s.lock.Unlock()
29
30
return
s.len == 0
31
}
32
33
func
(s *Stack) Pop() (el
interface
{}) {
34
s.lock.Lock()
Callers
1
TestNew
Function · 0.45
Calls
no outgoing calls
Tested by
1
TestNew
Function · 0.36