Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/arnauddri/algorithms
/ isEmpty
Method
isEmpty
data-structures/queue/queue.go:27–32 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
25
}
26
27
func
(q *Queue) isEmpty() bool {
28
q.lock.Lock()
29
defer
q.lock.Unlock()
30
31
return
q.len == 0
32
}
33
34
func
(q *Queue) Shift() (el
interface
{}) {
35
//q.lock.Lock()
Callers
1
TestNew
Function · 0.45
Calls
no outgoing calls
Tested by
1
TestNew
Function · 0.36